60 347
Assignments Done
98%
Successfully Done
In April 2018

Answer to Question #15923 in C++ for ishba

Question #15923
c++ program to enter 4 digit number & print whether it is a palindrome or not
Expert's answer
#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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions