Advertisement
Guest User

Untitled

a guest
Nov 14th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <climits>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. string p; unsigned int a;
  9. cout << "Bitte geben Sie den zu verschlüsselnden Text ein: ";
  10. getline(cin, p);
  11. cout << "Bitte geben Sie die Anzahl Verschiebepositionen ein (als positive ganze Zahl): ";
  12. cin >> a;
  13.  
  14.  
  15. for (unsigned int i = 1; i <= p.length(); i++)
  16. {
  17. p.at(i) = (int)p.at(i) + a;
  18. cout << p;
  19. }
  20. system("Pause");
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement