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
What is the difference between public, private, and protected access?
What is encapsulation in c++?
What is a pointer with example?
How can I improve my c++ skills?
Show the declaration for a static function pointer.
What is java and c++?
What is set in c++?
What are abstract data types in c++?
What do you understand by pure virtual function? Write about its use?
What does new return if there is insufficient memory to make your new object?
Write bites in Turbo c++ Header ("Include") Files.
what is scupper?
Can non-public members of another instance of the class be retrieved by the method of the same class?
What are 2 ways of exporting a function from a dll?
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