#include <iostream> #include <string> #include <windows.h> using namespace std; int main() { SetConsoleCP(1251); SetConsoleOutputCP(1251); unsigned count{}; // счетчик, указывающий колличество определенного символа в фамилии string sname; cout << "Введите вашу фамилию: "; getline(cin, sname); for (const char k : sname) { if (k == 'б' or k == 'Б') { count++; } } cout << "Количество вхождений буквы: " << count << endl; }