Code for reversing of a number(Using while loop) Get link Facebook X Pinterest Email Other Apps Code for reversing of a number(Using while loop) #include<stdio.h> #include<conio.h> void main() { int r=0,c,n; printf("Enter any number"); scanf("%d",&n); while(n>0) { c=n%10; n=n/10; r=r*10+c; } printf("Reverse=%d",r); getch(); } Output Get link Facebook X Pinterest Email Other Apps Comments
Comments
Post a Comment