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
please visit this site you'll find my question this is my homework please answer it if you can http://easyscience.org/ib/lofiversion/index.php/t36168.html
Describe the My Computer and My Documents folders; identify the elements that are present in every Window.
What is stl stand for?
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
totoo po ba ang manga aliens!
i wanted to know about questions about c,c++ , which is required for placements.... im a fresher
What do stl stand for?
What is stl in oop?
Name the different types of stl containers.
In what scenario does the Logical file and Physical file being used?
How is stl different from c++ standard library?
What are stl algorithms?
What are the components of stl?
Q1. A. What is unary operator? List out the different operators involved in the unary operator. B. What is an adjust field format flag? Q2. A. Distinguish between a # include and #define. B. Can a list of string be stored within a two dimensional array? Q3. A.Explain how a pointer to function can be declared in C++? B.List the merits and demerits of declaring a nested class in C++? Q4. A. What are the syntactic rules to be avoid ambiguity in multiple inheritence? B. Explain the operation of overloading of an assignment operator. Q5. A. Explain how the virtual base class is different from the conventional base classes of the opps. B. Explain how an exception handler is defined and invoked in a Program. Q6. A. What is a binary file? List the merits and demerits of the binary file usagein C++. B. Write short notes on Text Manipulation Routines. C. Write bites in Turbo c++ Header (“Include”) Files.
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