Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- using namespace std;
- char sir[101],*p;
- bool ok;
- int main()
- {
- cin.get(sir,101);
- p=strtok(sir," ");
- while(p)
- {
- if(strstr(p,"DO")||strstr(p,"RE")||strstr(p,"MI")||strstr(p,"FA")||strstr(p,"SOL")||strstr(p,"LA")||strstr(p,"SI"))
- cout<<p<<'\n',ok=true;
- p=strtok(NULL," ");
- }
- if(!ok)
- cout<<"nu exista";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement