fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. string Palindrome(string str)
  5. {
  6. string P=str;
  7.  
  8. reverse(P.begin(),P.end());
  9.  
  10. if(str==P)
  11. {
  12. return "Yess";
  13. }
  14. else
  15. {
  16. return "NOO";
  17. }
  18. }
  19. int main()
  20. {
  21. string str;
  22. cin>>str;
  23. cout<<Palindrome(str);
  24. return 0;
  25. }
Success #stdin #stdout 0s 5304KB
stdin
Standard input is empty
stdout
Yess