Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4. int main()
  5. {
  6. int ok,i,j,k;
  7. char s[256],t[256],y[2];
  8. cin.get(s,256,'\n');
  9. t[0]='\0';
  10. for(i=0;i<strlen(s);i++)
  11. {
  12. y[0]=s[i];
  13. y[1]='\0';
  14. if(s[i]!=' ' && isalpha(s[i]))strcat(t,y);
  15. if((s[i]==' ' || i==strlen(s)-1) && t[0]!='\0')
  16. {
  17. ok=0;
  18. for(j=0;j<strlen(t);j++)
  19. if(strchr("aeiou",t[j])==0)ok=1;
  20. if(ok==0)cout<<t<<endl;
  21. t[0]='\0';
  22. }
  23. }
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement