0

Reverse integer in each newline \n

#include <stdio.h> int main() { int num,reverse = 0; printf("Enter n: "); scanf(" %d", &num); while (num != 0) { reverse = reverse * 10 + num % 10; num /= 10; } printf("%d\n", reverse); return 0; } https://code.sololearn.com/cgqSQAGWS4Zy

7th Feb 2022, 9:08 AM
Tairitsu
Tairitsu - avatar
1 Answer
+ 2
Tairitsu Make another function which will print in separate line. https://code.sololearn.com/c8dhIoZg6E8u/?ref=app
7th Feb 2022, 10:12 AM
A͢J
A͢J - avatar