Post Top Ad

Your Ad Spot

Pages

Sunday, 9 February 2020

Write A Program Display Pelindrome Number bettween A To B


#include<stdio.h>
#include<conio.h>

int RevNo(int no)

     int i,res=0;
  for(i=no;no;i++)
  {
  res=res*10+no%10;
  no=no/10;
 }
  return res;
}
int IspelindromeAtoB(int a,int b)
{
  int i;
  
for(i=a;i<=b;i++)
{
   if(RevNo(i)==i)
   { 
   printf("%d \n",i);
   }
}
}  

void main()

   IspelindromeAtoB(10,100);
} 

No comments:

Post a Comment

Post Top Ad

Your Ad Spot

Pages