Asked by
AL MaMun (4 Golds)
Friday, 31 Jul 2020, 04:42 PM
at (Education
Tutorials)
|
|
|
|
A C program to reverse a number : #include<stdio.h> int main() { int n, temp, rev=0, r; printf("Enter a Number\n"); scanf("%d", &n); while(n!=0) { rev=rev*10; rev=rev+n%10; n=n/10; } printf("Reverse Number = %d", rev); return 0; } |