Advertisement
Nita_Cristian

Problema -2

Nov 19th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. /// Se da un cuvant format din litere mici. Sa se afiseza pe o linie a ecranului toate vocalele
  2. /// iar pe linia urmatoare toate consoanele
  3.  
  4. #include<iostream>
  5. #include<cstring>
  6.  
  7. using namespace std;
  8.  
  9. char x[256];
  10.  
  11. int main()
  12. {
  13.     cin >> x;
  14.  
  15.     for(char it : x)
  16.     {
  17.         if(strchr("aeiou",it) && it != '\0')
  18.             cout << it;
  19.     }
  20.  
  21.     cout << '\n';
  22.  
  23.     for(char it : x)
  24.     {
  25.         if(!strchr("aeiou",it) && it != '\0')
  26.             cout << it;
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement