Advertisement
Okiko

Cipher (+3)

Apr 19th, 2019
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3. #include <string>
  4.  
  5. int main()
  6. {
  7.     std::string str;
  8.     std::getline(std::cin, str);
  9.  
  10.     for(int index = 0; index < str.length(); index++){
  11.         str[index] = tolower(str[index]) + 3;
  12.  
  13.         if(str[index] > 122){
  14.             str[index] = tolower(str[index]) - 26;
  15.         }
  16.     }
  17.  
  18.     std::cout << str;
  19.  
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement