write a program that input four digit no and finds it is
palindrome or not
Answer Posted / karthik p b
#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 |
Post New Answer View All Answers
What is stl stack?
Do you like to Submit Questions in Bulk under Same Category?? Then use our Bulk ListerDo you like to Submit Questions in Bulk under Same Category?? Then use our Bulk Lister
write a program to convert a decimal number in to its equivalent binary number?
What is stl stand for?
sir please send me bpcl previous question papers
What does stl stand for in basketball?
In what scenario does the Logical file and Physical file being used?
What is stl language?
What is stl in c++ with example?
What do stl stand for?
What does stl mean in slang?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
To modify an, existing worksheet. What steps are involved for: 1. Inserting and deleting rows and columns. 2. Printing cell formulas 3Jld displayed values 3. Using the page setup command
What are the different types of stl containers?
Describe how to safeguard a system through acquisition of an antivirus Program and systematic backup.