Write a program to find out the number of palindromes in a
sentence.
Answer / ravi
void main()
{
long int n;
printf("ENTER A NUMBER: ");
scanf("%ld",&n);
long int n1,mod;
n1=n;
long int rev=0;
while(n>0)
{
mod = n%10;
rev = rev * 10 + mod;
n = n / 10;
}
if (n1 == rev)
printf("%ld is a palindrome\n",n1);
else
printf("%ld is not a palindrome\n",n1);
}
Is This Answer Correct ? | 7 Yes | 10 No |
What is the outcome of the line of code "cout<<abs(- 16.5);"? 1) 16 2) 17 3) 16.5
What is the difference between a mixin and inheritance?
What is pure oop?
any one please tell me the purpose of operator overloading
What is a mixin class?
How is exception handling carried out in c++?
What is the real time example of encapsulation?
Iam doing my project on instant messaging , if you any new ideas regarding this project ,please suggest it?
What are different oops concepts?
how to create thread in java?
17 Answers IBM, Infosys, Wipro,
What is object-oriented programming? Webopedia definition
hi all..i want to know oops concepts clearly can any1 explain??