Like the code below :
int count = 0;
std::cin >> count_of_emploies;
for (int i = 0; i < 11 && (count <= 1 || count >= 100); i++) {
std::cout << "enter again.";
std::cin >> count;
if (i > 9) return 0;
}
but when input was like "asdf" this code causes all the std::cin crush and the other part of the program almost work but without waiting for user's input.