Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. string z="Alfred almat evett";
  8. string p="";
  9. int h=0;
  10. for (int i=0;i<z.length();i++)
  11. {
  12. if (z[i]=='A' || z[i]=='E' || z[i]=='I' || z[i]=='O' || z[i]=='U' || z[i]=='a' || z[i]=='e' || z[i]=='i' || z[i]=='u')
  13. {
  14. p[h]=z[i];
  15. h=h+1;
  16. }
  17. }
  18. int x=0;
  19. cout << "adj egy x erteket";
  20. cin >> x;
  21. for (int j=0;j<x;j++)
  22. {
  23. cout << p[j];
  24. }
  25. return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement