write program for palindrome

Answer Posted / md.irfan(rourkela)

#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(m==n)
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}

Is This Answer Correct ?    1204 Yes 747 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Implement stack operations with pointers with appropriate exception checks.

570


Explain how the virtual base class is different from the conventional base classes of the opps.

695


What is difference between array and vector in c++?

564


What is difference between c++ and c ++ 14?

583


How many types of classes are there in c++?

602






How does a copy constructor differs from an overloaded assignment operator?

562


I want to write a C++ language program that: 1. Reads in the size of a square from the screen; 2. Prints a hollow square of that size out of “-“, “|” and blanks on screen; 3. Prints the same hollow square onto a text file. The program should work for squares of all side sizes between 1 and 20.

2297


Write a program that takes a 5 digit number and calculates 2 power that number and prints it.

2073


What is the equivalent of Pascal's Real a) unsigned int b) float c) char

593


What is array in c++ pdf?

558


What is #include sstream?

630


Can I learn c++ as my first language?

613


What is meant by iomanip in c++?

613


What do you mean by function and operator overloading in c++?

614


Show the declaration for a pointer to function returning long and taking an integer parameter.

584