#include void main() { int a,b,c=0; printf("enter no\n"); scanf("%d",&a); while(a!=0) { b=a%10; c=c*10+b; a=a/10; } printf("Reversed no. is %d\n",c); } Output:
No comments: