Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <climits>
- using namespace std;
- int main()
- {
- string p; unsigned int a;
- cout << "Bitte geben Sie den zu verschlüsselnden Text ein: ";
- getline(cin, p);
- cout << "Bitte geben Sie die Anzahl Verschiebepositionen ein (als positive ganze Zahl): ";
- cin >> a;
- for (unsigned int i = 1; i <= p.length(); i++)
- {
- p.at(i) = (int)p.at(i) + a;
- cout << p;
- }
- system("Pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement