Advertisement
Guest User

Untitled

a guest
Jun 18th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include <iostream.h>
  2. #include <string.h>
  3. int main ()
  4. {char s[255],*cuv,t[255];
  5. int k=-1;
  6. gets (s);
  7. cuv=strtok(s," ");
  8. while (cuv)
  9. {
  10. if (strlen(cuv)==3)
  11. t[++k]='*';
  12. else
  13. {
  14. strcat(t,cuv);
  15. k=k+strlen(cuv);
  16. }
  17. cuv=strtok(NULL, " ");
  18. if (cuv)
  19. t[++k]=' ';
  20. }
  21. cout << t;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement