---
title: "Discussion on \"Write a program that prints all possible combinations of single-digit numbers\" | Hashnode"
description: "Discussion on \"Write a program that prints all possible combinations of single-digit numbers\". Using both putchar and printf functions with for and while loops"
url: "https://hashnode.com/posts/write-a-program-that-prints-all-possible-combinations-of-single-digit-numbers/629f12744d2584547c17ede4"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Write a program that prints all possible combinations of single-digit numbers](https://blog.ehoneahobed.com/write-a-program-that-prints-all-possible-combinations-of-single-digit-numbers?utm_source=hashnode&utm_medium=feed)

Using both putchar and printf functions with for and while loops

Jun 7, 2022 · 3 min read · blog.ehoneahobed.com  
Updated Oct 19, 2023  
Read the article

-   [#c-programming](https://hashnode.com/tag/c-programming)
-   [#c-program](https://hashnode.com/tag/c-program)
-   [#coding](https://hashnode.com/tag/coding)
-   [#loops](https://hashnode.com/tag/loops)
-   [#printf](https://hashnode.com/tag/printf)

## Written by

[Dr. Ehoneah Obed](https://hashnode.com/@ehoneahobed)

@ehoneahobed

  
[View profile](https://hashnode.com/@ehoneahobed)

Software and AI engineer, health informatician, and registered pharmacist. I write about what I build and what I learn.

Heya! 👋 I love helping people, and one of the best ways I do this is by sharing what I learn and build. I started as a pharmacist at a tertiary hospital in Northern Ghana, where I saw how much technology could improve healthcare. That sparked my interest in digital health. I taught myself to code, then joined the ALX Software Engineering program, which became a turning point. I went on to complete a Master of Health Informatics at the University of Toronto. Today I am a software and AI engineer and a health informatician, and I practise remotely as a Digital Health Pharmacist. I combine clinical experience with technical skills to build tools that solve real problems in health and beyond, and I write here about what I build and what I learn.

## Responses 1

Markdown supported · ⌘↵ to post

[Oluwademilade Eniade](https://hashnode.com/@grace849)

[Feb 11, 2023](https://hashnode.com/posts/write-a-program-that-prints-all-possible-combinations-of-single-digit-numbers/629f12744d2584547c17ede4/comment/63e7b8d76a6e8e124687ac06)

Hi, Nice presentation Dr Obed 👍 What if you wanted to print up to 20 I've tried out your code but I could only get 1 to 9..after which I got :;<.....
