Computer Science, asked by sameeralam2063, 8 months ago

Write a program that asks any number and displays its reverse.

Answers

Answered by lohithamahivara
0

Answer:

C program to reverse 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);

Hope it helps you

Please mark my answer BRAINLIEST

Similar questions