Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cstring>
- using namespace std;
- int main()
- {
- int cate=0;
- char s[256],*p;
- cin.getline(s,256);
- p=strtok(s," ");
- cate=0;
- while(p!=0)
- {
- if(strstr(p,"DO") || strstr(p,"RE") || strstr(p,"MI") || strstr(p,"FA") || strstr(p,"SOL") || strstr(p,"LA") || strstr(p,"SI"))
- {
- cate++;
- cout<<p<<endl;
- }
- p=strtok(0," ");
- }
- if(cate==0)
- {
- cout<<"nu exista";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement