fork download
  1. #include <iostream>
  2. #include <stdio.h>>
  3.  
  4. using namespace std;
  5.  
  6. char text[10000];
  7.  
  8. bool ischar(char c){if ((c >='a' && c<= 'z' ) || (c>='A'&&c<='Z')) return 1; return 0;}
  9.  
  10. char converted(char c){
  11. if (ischar(c)){
  12. char ch = tolower(c);
  13. if(ch > 'm') ch-=13;
  14. else if(ch <= 'm') ch+=13;
  15. if(isupper(c)) ch = toupper(ch);
  16. return ch;
  17. }
  18. return c;
  19. }
  20.  
  21. int main()
  22. {
  23. freopen("input.txt","r",stdin);
  24. freopen("output.txt","w",stdout);
  25. int counter = 0;
  26. char character;
  27. while(cin>> character)
  28. text[counter++] = converted(character);
  29. for(int i=0;i<counter;i++)
  30. cout << text[i];
  31.  
  32. return 0;
  33. }
  34.  
Success #stdin #stdout 0s 16072KB
stdin
Standard input is empty
stdout
Standard output is empty