program to print a reverse of a number
its not working...please tell me where it went wrong..........Code:#include<stdio.h> main() { int m,n,a,rev=0;; printf("enter a no"); scanf("%d",m); while(m!=0) { rev=rev*10; rev=rev+(m%10); m=m/10; } printf("%d",rev); }