Advertisement
Guest User

Untitled

a guest
Feb 19th, 2020
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include<iostream>
  2.  
  3. #include<cstring>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8.  
  9. {
  10.  
  11.    char s[256];
  12.  
  13.    cin.get(s,256);
  14.  
  15.    char *p=strtok(s," ");
  16.  
  17.    while(p)
  18.  
  19.    {
  20.  
  21.        if(strlen(p)==3)
  22.  
  23.            cout<<'*';
  24.  
  25.        else
  26.  
  27.            cout<<p;
  28.  
  29.        cout<<" ";
  30.  
  31.        p=strtok(NULL," ");
  32.  
  33.    }
  34.  
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement