Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. #define _CRT_SECURE_NO_WARNINGS
  2. #include <iostream>
  3. #include <string>
  4. using namespace std;
  5.  
  6. int main() {
  7.     string c, c1;
  8.     string res = "There is no result";
  9.     for (long i = 1; i <= 3; i++)
  10.     {
  11.         cin >> c;
  12.         c1 = "";
  13.         for (long j = c.length()-1; j >= 0; j--)
  14.         {
  15.             c1 = c1 + c[j];
  16.         }
  17.         if (c == c1) res = "S" + to_string(i);
  18.     }
  19.     cout << res;
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement