fork download
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4. int main() {
  5. char a, b = 'z', c = 'a', d = 'Z', e = 'A';
  6. while(cin >> a){
  7. char f = a - 1, g = a - 35;
  8. if(a < b && a >= c){
  9. cout << char(a + 1);
  10. }
  11. else if(a < d && a >= e){
  12. cout << char(a + 1);
  13. }
  14. else if(a == 'z' || a == 'Z'){
  15. cout << char(a - 25);
  16. }
  17. }
  18. return 0;
  19. }
Success #stdin #stdout 0.01s 5288KB
stdin
ZOOKD

stdout
APPLE