#include
#include
using namespace std;
int main()
{
string s;
cin >> s;
set s1 = {'a','e','i','o','u','y'};
set s2 = {'b','c','d','f','g','h','j','k','l','m','n','p','q','r','s','t','v','w','x','z'};
int n1 = 0, n2 = 0;
for(int i=0; i if(s1.find(s[i]) != s1.end()) n1++;
else if(s2.find(s[i]) != s2.end()) n2++;
}
cout << n1 << " " << n2 << "\n";<br> if (n1>n2) cout << "Гласных больше";<br> else if (n1 else cout << "Кол-во гласных = кол-ву согласных";<br> return 0;
}
Пример:
program_var.
3 7
Согласных больше