Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- using namespace std;
- int main() {
- char A[100],*p,v;
- int ok=1,k=1,cnt=0;
- cin.getline(A,100);
- p=strtok(A," ");
- while(p)
- { ok=1;
- k=1;/// consideram cuv. ca fiind o singura vocala
- for(int i=0;i<strlen(p);i++)
- {
- if(strchr("aeiou",p[i])!=NULL && ok==1)
- {
- v=p[i];
- ok=0;
- }
- if(strchr("aeiou",p[i])!=NULL && p[i]!=v && ok==0)
- {
- k=0;
- }
- }
- if(k==1 && ok==0)
- {
- cout<<p<<endl;
- cnt++;
- }
- p=strtok(NULL," ");
- }
- if(cnt==0)
- {
- cout<<"nu exsita";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement