Advertisement
a53

Note

a53
Jan 7th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4. char sir[101],*p;
  5. bool ok;
  6.  
  7. int main()
  8. {
  9. cin.get(sir,101);
  10. p=strtok(sir," ");
  11. while(p)
  12. {
  13. if(strstr(p,"DO")||strstr(p,"RE")||strstr(p,"MI")||strstr(p,"FA")||strstr(p,"SOL")||strstr(p,"LA")||strstr(p,"SI"))
  14. cout<<p<<'\n',ok=true;
  15. p=strtok(NULL," ");
  16. }
  17. if(!ok)
  18. cout<<"nu exista";
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement