fork download
  1. #include <iostream>
  2. #include <vector>
  3. #include <string>
  4. using namespace std;
  5.  
  6. string Alfabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  7. string Szyfr = "DEFGHIJKLMNOPQRSTUVWXYZABC";
  8.  
  9. int main()
  10. {
  11. char buff[200];
  12. string text;
  13. text.reserve(201);
  14. cout<<"!!"<<endl;
  15. while(cin.getline(buff, 200))
  16. {
  17. text.clear();
  18. text.insert(0, buff);
  19. for(auto &it : text)
  20. {
  21. size_t i = Alfabet.find(it);
  22. it = Szyfr[i];
  23. }
  24. cout << text << endl;
  25. }
  26. return 0;
  27. }
Success #stdin #stdout 0s 3420KB
stdin
ABC DEF
TERA EST ROTUNDA
stdout
!!
DEF�GHI
WHUD�HVW�URWXQGD