Advertisement
IlincaMuresan

vocale consoane

Nov 19th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include<iostream>
  2. #include<cstring>
  3. using namespace std;
  4. char x[256];
  5. char y[256];
  6. char z[256];
  7. char w[6]="aeiou";
  8.  
  9. int main()
  10. {
  11. cin>>x;
  12. int i;
  13. int l1=-1;
  14. int l2=-1;
  15. for(i=0;i<strlen(x);i++)
  16. {
  17. if(strchr(w,x[i]))
  18. {
  19. y[++l1]=x[i];
  20. }
  21. else
  22. {
  23. z[++l2]=x[i];
  24. }
  25. }
  26.  
  27. cout<<y<<"\n";
  28. cout<<z;
  29. return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement