Advertisement
Zuneve

awdaaaaaaaaaaaaa

Nov 3rd, 2022
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4. int main() {
  5. string s;
  6. cin >> s;
  7. if (s[1]=='+') {
  8. if (s[0]=='x') cout << s[4]-s[2];
  9. if (s[2]=='x') cout << s[4]-s[0];
  10. if (s[4]=='x') cout << s[0]+s[2]-96;
  11. } else {
  12. if (s[0]=='x') cout << s[4]+s[2]-96;
  13. if (s[2]=='x') cout << s[0]-s[4];
  14. if (s[4]=='x') cout << s[0]-s[2];
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement