Что в коде не так? #include #include #include using namespace std; int main() { string s; vector vowels = ('a','e','i','o','u','y'); cin > > s; int count_letters = 0; int count = 0; int state = -1; int c = state; for(int i = 0 ; i < s.length(); i++, c = state) { if(find(vowels..)! = vowels. state = 0; else state = 1; if(c==state) count_letters++; if(count_letters == 3) { count_letters = 1; count++; } } cout < < count ; } in function 'int main()': conversion from char to non-scalar type requested cin was not declared in this scope cout was not declared in this scope
198
344
Ответы на вопрос:
#include < iostream> #include < vector> #include < algorithm> using namespace std; int main() { string s; vector< char> vowels = {'a','e','i','o','u','y'}; cin > > s; int count_letters = 0; int count = 0; int state = -1; int c = state; for(int i = 0 ; i < s.length(); i++, c = state) { if(find(vowels..) ! = vowels. state = 0; else state = 1; if(c==state) count_letters++; if(count_letters == 3) { count_letters = 1; count++; } } cout < < count ; }
Популярно: Информатика
-
Olesya2225413.08.2021 16:35
-
daryankaa130.06.2022 10:25
-
Alekskarpov10.03.2022 08:25
-
ShkolnikN1526.12.2020 18:03
-
andreyusachevp0cxzy28.06.2022 01:02
-
rimmabuketova23.06.2021 21:35
-
Maria2005y22.04.2021 15:42
-
090904420.06.2023 07:14
-
hlipkaya17.06.2023 03:42
-
fhctybq12307.10.2021 16:48