Print all the palindrome numbers.If a number is not
palindrome make it one by attaching the reverse to it.
eg:123
output:123321 (or) 12321
Answer Posted / sahibzada nisar ahmad
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int a,b,c,d,e;
printf("Enter Three Digits Number=");
scanf("%d",&a);
b=a/100;
c=a%100;
d=c/10;
e=c%10;
printf("\n\tThe Reverse Number is =%d%d%d=",e,d,b);
getch();
}
| Is This Answer Correct ? | 6 Yes | 13 No |
Post New Answer View All Answers
What are the types of i/o functions?
What is c variable?
Apart from dennis ritchie who the other person who contributed in design of c language.
Explain how do you determine a file’s attributes?
The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference
What is structure pointer in c?
Write a program to reverse a given number in c?
Without Computer networks, Computers will be half the use. Comment.
What are structural members?
What is main function in c?
Write a program to identify if a given binary tree is balanced or not.
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What is modifier & how many types of modifiers available in c?
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?