Computer Science, asked by shyam3212003, 10 months ago

Design a C program which reverse the number.​

Answers

Answered by tejash1101
2

Answer:

Enter an integer :1234

Reversed number :4321

Explanation:

#include <stdio.h>

int main()

{

int n, a= 0, c;

clrscr();

printf("Enter an integer: ");

scanf("%d", &n);

while (n != 0)

{

c = n % 10;

a= a* 10 + c;

n /= 10;

}

printf("Reversed number = %d", a);

getch();

return 0;

}

Similar questions