write program for palindrome
Answer Posted / gunajit bhuyan (ulubar, guwaha
void main()
{
int n,num,digit,sum,rev;
printf("input a number to check for palindrom\n");
scanf("%d",&n);
n=num;
do
{
digit=num%10;
sum+=digit;
rev=rev*10+digit;
num/=10;
while (num!=0);
printf("sum of the digits of the number is =%d",sum);
printf("Reverse of the number is =%d",rev);
if(n==rev)
printf("this number is palindrom");
else
printf("this number is not palindrome");
getch();
}
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
Is facebook written in c++?
Write some differences between an external iterator and an internal iterator? Describe the advantage of an external iterator.
If a base class declares a function to be virtual, and a derived class does not use the term virtual when overriding that class, is it still virtual when inherited by a third-generation class?
Does dev c++ support c++ 11?
Is turbo c++ free?
What are features of c++?
What is a pointer with example?
How do you clear a map in c++?
What are the operators in c++?
Explain what is class definition in c++ ?
How can you link a c program with a c function?
What is cout flush?
What apps are written in c++?
what are the iterator and generic algorithms.
What is private public protected in c++?