Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- string c, c1;
- string res = "There is no result";
- for (long i = 1; i <= 3; i++)
- {
- cin >> c;
- c1 = "";
- for (long j = c.length()-1; j >= 0; j--)
- {
- c1 = c1 + c[j];
- }
- if (c == c1) res = "S" + to_string(i);
- }
- cout << res;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement