print_number
| print_number | |
|---|---|
| Turn-in directory | 03_print_number/ |
| Files to turn in | print_number.c |
| Allowed functions | putchar |
- Write a function which prints the value of the 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.
- 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$