Я думаю, что вопрос говорит сам за себя, я пишу программу на c ++, и есть часть, где консоль спрашивает пользователя, какой тип ввода он хочет использовать
while (loop == 5) {
cout << "\nWould you like to enter a depoist or a check? "; //asks for a choice
cin >> choice;
//determines whether or not to close the program
if(choice == 0 || depo == 0 || check == 0) {
return 0;
}//end close if
//choses which type of input to make
if( choice == 1) {
cout << "\nPlease enter check amount: ";
cin >> check;
check += check;
} else if(choice == 2) {
cout << "\nPlease enter deposit amount: ";
cin >> depo;
depo += depo;
}//end if
}
но как мне отслеживать, сколько раз оператор if был верным?