fork(1) download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. char array[30] = {};
  8. const char vowel[6] = { 'a', 'e', 'i', 'o', 'u',};
  9. cin.get(array , 30);
  10. for ( int i = 0; i < 30; ++i)
  11. {
  12. for ( int j = 0; j < 5; ++j)
  13. {
  14. if (array[i] == vowel[j])
  15. {
  16. cout << array[i] << " ";
  17. }
  18. }
  19. }
  20. }
  21.  
Success #stdin #stdout 0.01s 2684KB
stdin
Hello, world
stdout
e o o