/* Reverse a Number (10 points) Problem Statement: Write a C program that reads a five digit integer from the keyboard and prints the same number but with its digits in reverse order. For example, if the user entered 12345 the program must print 54321. */ #include #include void reverse(int a) { int d5,d4,d3,d2,d1; /* Logic to obtain individual digits of the number */ d1=a%10; a=a/10; d2=a%10; a=a/10; d3=a%10; a/=10; d4=a%10; a/=10; d5=a%10; printf("Reverse %d%d%d%d%d\n", d1, d2, d3, d4, d5); } int main() { int n; printf("Enter a five-digit integer: "); scanf("%d",&n); reverse(n); system("pause"); }