/*wap to find reverse of a num. using while loop & check whether the given no. is pelindrom or not*/ #include<stdio.h> #include<conio.h> void main() { int n,m,rev,a; clrscr(); printf("enter any int:"); scanf("%d",&n); while() { a=n%10; n=n/10; rev=rev+a; ; } printf("reverse number:%d",rev); if(n==rev) { printf("The Number is Pelindrom."); } else { printf("The Number is Not Pelindrom."); } }
No comments:
Post a Comment