USER'S CHOICE POST

Internet Download Manager free download for life time activated
Top 10 software you must have in your computer/laptop/tab with free download link

Earn upto Rs. 9,000 pm checking Emails. Join now! And get Rs. 99 Instantly!

ALL THE INFORMATION GIVEN IN THIS SITE IS ONLY FOR THE LEARNING PURPOSE. WE SHOULD ALWAYS USE THE GENUINE SOFTWARE! USE OF ANY INFORMATION GIVEN HERE IS SOLELY USERS' RESPONSIBILITY!


Sunday, 5 August 2012

Palindrome check

Filled under: ,


CHECK A NUMBER IS PAALINDROME OR NOT THROUGH FUNCTION

code:

#include<stdio.h>
#include<conio.h>
int palindrome(int);
int palindrome(int a)
{
 int m,r,rev=0;
 m=a;
 while(a!=0)
 {
  r=a%10;
  a=a/10;
  rev=(rev*10)+r;
 }
 if(m==rev)
 {
  printf("The number is palindrome");
 }
 else
 {
  printf("The number is not palindrome");
 }
 return(0);
}
void main()
{
 int p;
 clrscr();
 printf("Enter a number::");
 scanf("%d",&p);
 palindrome(p);
 getch();
}


DON'T FORGET TO JOIN THIS BLOG & LIKE OUR FB FAN PAGE.. SHARE IT WITH YOUR FRIEND

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...


Try New Whatsapp+ latest for free with lots of new Emoticons :) , Latest Version
Download NOW