Advertisement
mercMatvey4

Untitled

May 26th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. #include <iostream>
  2. #include <string.h>
  3. using namespace std;
  4.  
  5. const char gl[] = "aeiou";
  6.  
  7. int main()
  8. {
  9. char vod[255] = {0};
  10. gets(vod);
  11. char rab[100][100] = {0};
  12. int an[100][2] = {0};
  13. int i, j, s = 0, c = 0;
  14. for (i = 0 ; vod[i] != 0 ; i++)
  15. {
  16. if (vod[i] == ' ')
  17. {
  18. c = 0;
  19. s++;
  20. continue;
  21. }
  22. rab[s][c++] = vod[i];
  23. }
  24. for (i = 0 ; i <= s ; i++)
  25. {
  26. for (j = 0 ; rab[i][j] != 0 ; j++)
  27. {
  28. if (rab[i][j]==gl[0]||rab[i][j]==gl[1]||rab[i][j]==gl[2]||rab[i][j]==gl[3]||rab[i][j]==gl[4]) an[i][0]++;
  29. else
  30. {
  31. if (rab[i][j]=='.') continue;
  32. else an[i][1]++;
  33. }
  34. }
  35. if (an[i][1] > an[i][0]) cout<<'$';
  36. cout<<rab[i]<<' ';
  37. }
  38. return 0;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement