Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

Print all the palindrome numbers.If a number is not
palindrome make it one by attaching the reverse to it.
output:123321 (or) 12321

Answer Posted / kifle tadesse mit

1# include<stdio.h>
2 int main()
3 {
4 int n,n1,rem,rev=0;
5 printf("enter the number u want to reverse\n");
6 scanf("%d",&n);
8 while(n>0)
10 rem=n%10;
11 rev=rev*10+rem;
12 n=n/10;
13 }
14 if(n1==rev)
15 printf("the given no is palindrome");
16 else
17 {
18 printf("no is not palindrome\n");
19 printf(" its palindrome by attaching it's reverse is
20 }return 0;
21 }

Is This Answer Correct ?    0 Yes 0 No

Post New Answer       View All Answers

Please Help Members By Posting Answers For Below Questions

Badboy is defined who has ALL the following properties: Does not have a girlfriend and is not married. He is not more than 23 years old. The middle name should be "Singh" The last name should have more than 4 characters. The character 'a' should appear in the last name at least two times. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers


What does double pointer mean in c?


Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given


what do you mean by enumeration constant?


Compare and contrast compilers from interpreters.


How the c program is executed?


What is int main () in c?


What is volatile keyword in c?


What are variables c?


swap 2 numbers without using third variable?


What is a list in c?


When should I declare a function?


Is c easier than java?


Why is a semicolon (;) put at the end of every program statement?


What is a keyword?