Write a program to enter any two digit number and print its reverse.
Answers
Answered by
2
Explanation:
C program to find reverse of a number
int main() { int n, r = 0;
printf("Enter a number to reverse\n"); scanf("%d", &n);
while (n != 0) { r = r * 10; r = r + n%10; n = n/10; }
printf("Reverse of the number = %d\n", r);
Similar questions
Computer Science,
3 months ago
Social Sciences,
3 months ago
Science,
8 months ago
Science,
8 months ago
Math,
1 year ago
English,
1 year ago
Math,
1 year ago