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 |
program in c++ that can either 2 integers or 2 floating point numbers and output the smallest number
What is polymorphism and why is it important?
Please send ford technologies placement paper 2 my mail id
what type of questions
What is static modifier?
What is the outcome of the line of code "cout<<abs(- 16.5);"? 1) 16 2) 17 3) 16.5
In which cases you use override and new base?
What is the difference between a mixin and inheritance?
What do you mean by stack program? Get me an example stack program?
what is the application of oops?
how to find no of instances of an object in .NET?
What is multilevel inheritance in oop?