Advertisement
ret_0

Untitled

Nov 25th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4. main()
  5. {
  6.     char c;
  7.     cin >> c;
  8.     string s = "qwertyuiopasdfghjklzxcvbnm";
  9.     for(int i = 0; i < 26; i++)
  10.     {
  11.         if(c == s[i])
  12.         {
  13.             if(i == 25)
  14.                 c = 'q';
  15.             else c = s[i+1];
  16.             break;
  17.         }
  18.     }
  19.     cout << c;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement