82. WAP to print palindrome number from 100 to 200
#include<stdio.h>
void
main()
{
printf("WAP to print palindrome
number from 100 to 200 \n");
int r,i,rev,temp;
for(i=100;i<=200;i++)
{
temp=i;
for(rev=0;temp;temp=temp/10)
{
r=temp%10;
rev=rev*10+r;
}
if(rev==i)
printf("%d ",i);
}
printf("\n");
}
Comments
Post a Comment