Answer to Question #15923 in C++ for ishba
c++ program to enter 4 digit number & print whether it is a palindrome or not
1
2012-10-05T08:10:35-0400
#include <iostream>
using namespace std;
int main()
{
string s, r;
cin>>s;
for (unsigned int i = 0; i < s.length(); i++)
r = s[i] + r;
cout<<(s==r?"Yes":"No")<<endl;
system("PAUSE");
return 0;
}
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
C++
Comments
Leave a comment