0

Reverse number

Reverse a number mean moving the digit at the last position to the first'position and vice versa

1st Sep 2023, 8:50 AM
Nandhini Veerendra
Nandhini Veerendra - avatar
3 ответов
+ 5
Your code is correct then what's your question?
1st Sep 2023, 9:42 AM
Sakshi [Offline 🙃]
Sakshi [Offline 🙃] - avatar
+ 1
this place is for asking questions not for asking answer , use feed section for solutions or answer others questions
2nd Sep 2023, 9:40 AM
Alhaaz
Alhaaz - avatar
0
#include <stdio.h> int main() { int n,r,rev=0; printf("\n Enter a number:"); scanf("%d",&n); while(n!=0) { r=n%10; rev=(rev*10)+r; n/=10; } printf("Reversed string=%d", rev); }
1st Sep 2023, 8:51 AM
Nandhini Veerendra
Nandhini Veerendra - avatar