print_number
Turn-in directory03_print_number/
Files to turn inprint_number.c
Allowed functionsputchar
  • Write a function which prints the value of the 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.
  • This is a good moment to learn more about C data types
include <stdio.h>

void print_number(int num);

int main()
{
    print_number(-28390);
    return 0;
}

Example output:

$ ./a.out
-28390$