write a program that input four digit no and finds it is
palindrome or not
Answers were Sorted based on User's Feedback
#include<stdio.h>
#include<conio.h>
void main()
{
int n,rev=0,rem, temp,i;
printf(" Enter the 4 digit number :\n");
scanf("%d", &n);
temp = n;
for(i=1;i<=4;i++)
{
rem = n % 10;
n = n/10;
rev = rev * 10 + rem;
}
if(temp == rev)
printf(" Its a palindrome:\n");
else
printf(" Not a palindrome:\n");
getch();
}
Is This Answer Correct ? | 1 Yes | 0 No |
What is meant by stl in c++?
sir please send me bpcl previous question papers
0 Answers BPCL Bharat Petroleum,
What are the different types of stl containers?
What is the use of stl?
How the STL's are implemented, What the difference between templates and STL?
write a c++ program to create an object of a class called employee containing the employee code name designation basic salarry HRA Da gross salary as data 10 such objects "members process "
what is use of for loop?
why & sign is used in copy constructor
give me the defination of inheritance?
In what scenario does the Logical file and Physical file being used?
What is a standard template library (stl)? What are the various types of stl containers?
What is C++ could you enplane me please?