solution : we'll have to break the number and print the individual digit, we can use % operation to get the digits
code :
void putlong(unsigned long n) {
if (n < 10) {
putchar(n + '0');
return;
}
putlong(n / 10);
putchar(n % 10 + '0');
}
No comments:
Post a Comment