A five digit number is input through the key board, a C program to reverse the number :
#include<stdio.h>
int main()
{
char a1,b1,c1,d1,e1;
printf("Enter five digit number : ");
scanf(" %c%c%c%c%c",&a1,&b1,&c1,&d1,&e1);
printf("Reverse number of this number is :%c%c%c%c%c",e1,d1,c1,b1,a1);
return 0;
}
Tags:
Programming
Share: