write program for palindrome
Answer Posted / amit
#include<iostream.h>
#include<conio.h>
main()
{
char c[8];
cout<<"enterd hte world of polindorom";
cin>>c;
int i=strlen(c);
i=i-1;
int flag=0;
for(int j=0;j<=1;j++)
{
if(c[j]==c[i])
{
flag=1;
}
else
{
int flag=0;
break;
}
}
i--;
if(flag==1)
{
cout<<"your option is polindorome";
}
else
{
cout<<"your option is not polindorome";
}
getch();
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the best c++ ide?
What are advantages of using friend classes?
What is a down cast?
Do class declarations end with a semicolon?
Who created c++?
Which programming language is best?
Is c++ a programming language?
What is class definition in c++ ?
What is code reusability in c++?
Why do we need runtime polymorphism in c++?
List the features of oops in c++?
Differentiate between realloc() and free().
What is the limitation of cin while taking input for character array?
How the delete operator differs from the delete[]operator?
What are structures and unions?