Advertisement
Guest User

Untitled

a guest
Feb 14th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1.     string stringToEncrypt;
  2.     cout << "Please enter the string to encrypt" << endl;
  3.     cin >> stringToEncrypt;
  4.  
  5.     int rightShift;
  6.     cout << "Please enter the right shift amount" << endl;
  7.     cin >> rightShift;
  8.  
  9.     for (int i = 0; i < stringToEncrypt.size(); i++)
  10.     {
  11.         stringToEncrypt[i] += rightShift;
  12.         cout << stringToEncrypt << endl;
  13.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement