C++ program to display all palindrome numbers between 100 and 200
Answers
Answered by
3
#include <iostream>
using namespace std;
int main()
{
cout<<"Palindrome no. btwn 100 and 200 are"<<endl;
for(int i=100;i<=200;i++)
{
int num=i,rev=0;
do
{
int d = num % 10;
rev = (rev * 10) + d;
num = num / 10;
} while (num != 0);
if (i == rev)
cout <<i<<"\t";
}
return 0;
}
Similar questions