Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char u,u2;
- string s,g;
- string szo="",szo2="";
- getline(cin,s);
- int k=0;
- while(s[k]!=' ')
- {
- szo=szo+s[k];
- k++;
- }
- u=s[k-1];
- g=szo;
- for(int i=k;i<=s.length();i++)
- {
- if(s[i]!=' ' and i!=s.length()){
- szo2=szo2+s[i];
- }
- else {
- u2=s[i-1];
- if(u==u2) g=g+" succes "+szo2;
- else g=g+" "+szo2;
- szo=szo2;
- szo2="";
- u=u2;
- }
- }
- cout<<g;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement