Post Top Ad

Your Ad Spot

Pages

Sunday 9 February 2020

Display All Pelindrome Number From N Onward


#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 IspelindromeNonward(int n)
{
  int i;
  int c=0;
  
for(i=10;c<=n;i++)
{
 
   if(RevNo(i)==i)
   { c++;
   printf("%d \n",i);
   }
}
}  

void main()

   IspelindromeNonward(49);
}

No comments:

Post a Comment

Post Top Ad

Your Ad Spot

Pages