Advertisement
dllbridge

Untitled

Nov 9th, 2022
832
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1. #include      <iostream>
  2. using namespace std;
  3.  
  4.  
  5. string   s,
  6.          s2       ,
  7.          s3       ,
  8.         _s = "WUB";
  9.        
  10. int   pos;
  11.  
  12. int f();
  13.  
  14. ////////////////////////////////////////////////////
  15. int main()                                       //
  16. {
  17.    
  18.     cin >> s;
  19.    
  20.     while(f() != -1)
  21.     {
  22.       s[pos  ] = ' ';    
  23.       s[pos+1] = ' ';
  24.       s[pos+2] = ' ';    
  25.     }
  26.    
  27.     cout << s << endl;
  28. }
  29.  
  30. ////////////////////////////////////////////////////
  31. int f()                                          //
  32. {
  33.  
  34.  pos = s.find("WUB");
  35.  
  36. return pos;    
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement