Advertisement
STANAANDREY

pb1 28/1/2020

Jan 28th, 2020
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4. #define NMAX 100
  5. #define LENMAX 256
  6.  
  7. int voc(char s[])
  8. {
  9.     for (int i = 0; s[i] != NULL; i++)
  10.         if (!strchr("aeiou", s[i]))
  11.             return 0;
  12.     return 1;
  13. }
  14.  
  15. void read(int& n, char c[][LENMAX])
  16. {
  17.     cin >> n;
  18.     for (int i = 0; i < n; i++)
  19.         cin >> c[i];
  20. }
  21.  
  22. char c[NMAX][LENMAX];
  23. int n;
  24. int main()
  25. {
  26.     read(n, c);
  27.     int k = 0;
  28.     for (int i = 0; i < n; i++)
  29.         if (voc(c[i]))
  30.             k++;
  31.     cout << k;//*/
  32.     return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement