This is a C program which finds the reverse of a given number.
PROGARM :
PROGARM :
#include <stdio.h> #include <stdlib.h> int main() { int number,remainder,reverse=0,num; printf("Enter a number :\t"); scanf("%d",&number); num=number; while(number) { remainder = number%10; reverse= reverse*10+remainder; number=number/10; } printf("Reverse of number %d is : \t %d ",num,reverse); return 0; }OUTPUT :
C - Reverse of a number |