fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. string str;
  6. getline(cin, str);
  7.  
  8. for (char &c : str) {
  9. if ('a' <= c && c <= 'z')
  10. c = c - 'a' + 'A';
  11. else if ('A' <= c && c <= 'Z')
  12. c = c - 'A' + 'a';
  13. }
  14.  
  15. cout << str;
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0s 5324KB
stdin
Standard input is empty
stdout
Standard output is empty