Sohila_Elshiref

F

Feb 16th, 2022 (edited)
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. string s, t;
  2. cin >> s >> t;
  3. ll n = s.size(), m = t.size(), sum1 = 0, sum2 = 0, sum = 0;
  4. if (s[n - 1] % 2 == 0)
  5. sum1 = s[n - 1];
  6. if (s[m - 1] % 2 == 0)
  7. sum2 = s[n - 1];
  8. sum = sum1 + sum2;
  9. if (sum % 2 == 0)
  10. cout << "Even";
  11. else
  12. cout << "Odd";
Add Comment
Please, Sign In to add comment