Computer Science, asked by parmjeetkaurgng6260, 9 months ago

Writte A Pgm To Didply All Palitrom Number Bettween 100 And 200

Answers

Answered by qwtiger
0

Answer:

I hope the question is write a program to print all palindrome number between 100 and 200

Explanation:

#include<iostream>  

using namespace std;  

   int check(int n)  

{  int rev = 0;  

   for (int i = n; i > 0; i /= 10)  

       rev = rev*10 + i%10;  

return (n==rev);  

}  

 

void countnum(int min, int max)  

{  

   for (int i = min; i <= max; i++)  

       if (check(i))  

         cout << i << " ";  

}  

   

int main()  

{  

   countnum(100, 200);  

   return 0;  

}  

Similar questions