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
Explain #pragma statements.
Can we use any name in place of argv and argc as command line arguments?
.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }
Do you know the use of fflush() function?
What are the types of i/o functions?
What is a stream?
can we implement multi-threads in c.
which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;
What does == mean in texting?
Which is more efficient, a switch statement or an if else chain?
What is the difference between text files and binary files?
Explain the advantages and disadvantages of macros.
If fflush wont work, what can I use to flush input?
Create a simple code fragment that will swap the values of two variables num1 and num2.
Why is C language being considered a middle level language?