C++ #include < iostream> using namespace std; int main() { int a = 0, b = 0; cin > > a > > b; if (a > b) { cout < < "больше"; } else if (a < b) { cout < < "меньше"; } else { cout < < "равно"; } return 0; }
ilysozkn27
24.01.2022
При условии что кроме пробелов и точек других символов или цифр нету, т.к. в о них не сказано: #include < algorithm> #include < iostream> using namespace std; int main() { string s; cout < < "enter string: "; getline(cin, s); for (auto i : s) { if (i == '.') { cout < < count_if( s. s. [](auto c) { return c ! = ' ' & & c ! = '.'; } ) < < endl; } } return 0; }