print_digits
| print_digits | |
|---|---|
| Turn-in directory | 02_print_digits/ |
| Files to turn in | print_digits.c |
| Allowed functions | putchar |
- Write a function which prints the value of the unsigned integer
numrepresented in the decimal numeral system. It has to be able to print all possible values. - You are not allowed to use recursion. If you don't know what recursion is, don't worry, you'll learn it later.
include <stdio.h>
void print_digits(unsigned int num);
int main()
{
print_digits(28390);
return 0;
}
Example output:
$ ./a.out
28390$