Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- string s1, s2;
- cout << "kerem a beolvasando stringet ";
- getline(cin, s1);
- size_t hely;
- size_t hely1=0;
- hely =1;
- int szaml=1;
- while(szaml!=0){
- szaml=0;
- hely= s1.find("a");
- if (hely != string::npos){
- s1.replace(hely, 1, "mpm");
- szaml++;
- }
- hely= s1.find("e");
- if (hely != string::npos){
- s1.replace(hely, 1, "mpm");
- szaml++;
- }
- hely= s1.find("i");
- if (hely != string::npos){
- s1.replace(hely, 1, "mpm");
- szaml++;
- }
- hely= s1.find("o");
- if (hely != string::npos){
- s1.replace(hely, 1, "mpm");
- szaml++;
- }
- hely= s1.find("u");
- if (hely != string::npos){
- s1.replace(hely, 1, "mpm");
- szaml++;
- }
- hely= s1.find("p", hely1);
- if (hely != string::npos){
- s1.replace(hely, 1, "pZ");
- hely1=hely+1;
- szaml++;
- }
- }
- cout << s1 << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement