Advertisement
Cati29

2813

Jan 26th, 2020
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4.  
  5. char s[300], t[300], *p;
  6. int main()
  7. {
  8. int k = 0;
  9. cin.getline(s, 100);
  10. p = strtok(s," ");
  11. while(p)
  12. {
  13. if(strchr("DO RE MI FA SOL LA SI", p)!=0)
  14. t[k++]=p;
  15. p = strtok(NULL, " ");
  16. }
  17. t[k++]=NULL;
  18. cout << t;
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement