write program for palindrome

Answer Posted / dude

#include<stdio.h>
#include<conio.h>
void main()
{
int n,s=0,m;
clrscr();
printf("enter any no");
scanf("%d",&n);
m=n;
while(n>0)
{
r=n%10;
s=s*10+r;
n=n/10;
}
if(s == n) // This is important step
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}

Is This Answer Correct ?    199 Yes 137 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between public, private, and protected access?

788


What is encapsulation in c++?

894


What is a pointer with example?

856


How can I improve my c++ skills?

793


Show the declaration for a static function pointer.

773






What is java and c++?

864


What is set in c++?

814


What are abstract data types in c++?

738


What do you understand by pure virtual function? Write about its use?

749


What does new return if there is insufficient memory to make your new object?

762


Write bites in Turbo c++ Header ("Include") Files.

909


what is scupper?

2068


Can non-public members of another instance of the class be retrieved by the method of the same class?

788


What are 2 ways of exporting a function from a dll?

842


write asingle linked list which read from two list & the do the following 1 sort the prime & nonprime num (prime should be less tn nonprime) 2 each node has a prime num followd by nonprime 3 add a new node into its sutable plce 4 erase the most three duplicated non prime num 5 find the least duplicated prime num

2390