Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream.h>
- #include <string.h>
- int main ()
- {char s[255],*cuv,t[255];
- int k=-1;
- gets (s);
- cuv=strtok(s," ");
- while (cuv)
- {
- if (strlen(cuv)==3)
- t[++k]='*';
- else
- {
- strcat(t,cuv);
- k=k+strlen(cuv);
- }
- cuv=strtok(NULL, " ");
- if (cuv)
- t[++k]=' ';
- }
- cout << t;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement