2 solutions

  • 1
    @ 2025-7-15 17:13:19

    #include <bits/stdc++.h> using namespace std; string b, c;

    int main() { char s; getline(cin, b); c = ""; for (int i = 0; i < b.size(); i++) { s = b[i]; if ((s >= 'a' && s <= 'z') || (s >= 'A' && s <= 'Z')) { s++; if ((s > 'Z' && s < 'a') || (s > 'z')) { s = s - 26; } } c = c + s; } cout << c; return 0; }

    • 1
      @ 2025-7-15 17:12:47

      #include <bits/stdc++.h> using namespace std; string b, c;

      int main() { char s; getline(cin, b); c = ""; for (int i = 0; i < b.size(); i++) { s = b[i]; if ((s >= 'a' && s <= 'z') || (s >= 'A' && s <= 'Z')) { s++; if ((s > 'Z' && s < 'a') || (s > 'z')) { s = s - 26; } } c = c + s; } cout << c;

      return 0;
      

      }

      • 1

      Information

      ID
      455
      Time
      1000ms
      Memory
      64MiB
      Difficulty
      6
      Tags
      # Submissions
      26
      Accepted
      12
      Uploaded By