fork download
  1. #include <iostream>
  2. int main()
  3. {
  4. char ch;
  5. const char * alphabet = "abcdefghijklmnopqrstuvwxyz";
  6. std::cin >> ch;
  7. int position1 = ch - 'a';
  8. int position2 = (position1 + 1) % 26;
  9. int position3 = (position1 + 2) % 26;
  10. std::cout << ch << alphabet[position2] << alphabet[position3];
  11. }
  12.  
  13.  
Success #stdin #stdout 0.01s 5280KB
stdin
z
stdout
zab