print_digits
Turn-in directory02_print_digits/
Files to turn inprint_digits.c
Allowed functionsputchar
  • Write a function which prints the value of the unsigned integer num represented 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$