Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- string str, eingabestr, ausgabestr = "";
- int j = 0;
- cout << "Text: ? ";
- getline(cin, eingabestr);
- j = eingabestr.length();
- for (int i = 0; i < eingabestr.length(); i++) {
- if (eingabestr[i] == 'a') {
- ausgabestr[j] = str[0];
- }
- else {
- ausgabestr[j] = eingabestr[i];
- }
- cout << ausgabestr[j];
- j--;
- }
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement