reverse digits in a number without using arrays

threebsd

1 #include <stdio.h>
2
3 int main()
4 {
5 int n = 765276;
6 int ascii;
7 do
8 {
9 ascii = n%10;
10 n = n/10;
11 printf(ā€œ%d ā€œ, ascii);
12 }
13 while (ascii !=0 && n !=0);
14 printf(ā€œ\nā€);
15
16 return 0;
17 }

View original post