SHARE
TWEET

Untitled

a guest Oct 14th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7.  
  8. {
  9.     string s1, s2;
  10.     cout << "kerem a beolvasando stringet ";
  11.     getline(cin, s1);
  12.     size_t hely;
  13.     size_t hely1=0;
  14.  
  15.     hely =1;
  16.     int szaml=1;
  17.     while(szaml!=0){
  18.         szaml=0;
  19.         hely= s1.find("a");
  20.         if (hely != string::npos){
  21.             s1.replace(hely, 1, "mpm");
  22.             szaml++;
  23.         }
  24.  
  25.         hely= s1.find("e");
  26.         if (hely != string::npos){
  27.             s1.replace(hely, 1, "mpm");
  28.             szaml++;
  29.         }
  30.  
  31.         hely= s1.find("i");
  32.         if (hely != string::npos){
  33.             s1.replace(hely, 1, "mpm");
  34.             szaml++;
  35.         }
  36.  
  37.         hely= s1.find("o");
  38.         if (hely != string::npos){
  39.             s1.replace(hely, 1, "mpm");
  40.             szaml++;
  41.         }
  42.  
  43.         hely= s1.find("u");
  44.         if (hely != string::npos){
  45.             s1.replace(hely, 1, "mpm");
  46.             szaml++;
  47.         }
  48.  
  49.         hely= s1.find("p", hely1);
  50.         if (hely != string::npos){
  51.             s1.replace(hely, 1, "pZ");
  52.             hely1=hely+1;
  53.             szaml++;
  54.         }
  55.  
  56.     }
  57.     cout << s1 << endl;
  58.  
  59.  
  60.  
  61.     return 0;
  62. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top