Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5. int main(void)
  6. {
  7. static char s[10000][101];
  8. int k = 0, n, i = 0, a[10000];
  9. _Bool wow = 0, nwow = 0;
  10. scanf("%d", &n);
  11. for (int j = 0; j < n; j++)
  12. scanf("%d", &a[j]);
  13. fgets(s[0], 101, stdin);
  14. for (int j = 0; j < n; j++)
  15. fgets(s[j], 101, stdin);
  16. for (int j = 0; j < n; j++)
  17. {
  18. while(s[j][i] != '\0')
  19. {
  20. switch (s[j][i])
  21. {
  22. case 'Y': ;
  23. case 'A': ;
  24. case 'E': ;
  25. case 'I': ;
  26. case 'O': ;
  27. case 'U': ;
  28. case 'a': ;
  29. case 'e': ;
  30. case 'i': ;
  31. case 'o': ;
  32. case 'u': ;
  33. case 'y': if (!i) k++; if (nwow) wow = 1; break;
  34. default: nwow = 1;
  35. }
  36. if (wow && nwow)
  37. {
  38. k++;
  39. wow = 0;
  40. nwow = 0;
  41. }
  42. i++;
  43. }
  44. i = 0;
  45. if (a[j] == k)
  46. printf("%s", s[j]);
  47. k = 0;
  48. }
  49. return 0;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement