Commit d43e8eba authored by Michael's avatar Michael

michael.davityan:exercise_04_20v4

parent 781fe36e
Pipeline #23164872 passed with stage
in 2 minutes and 9 seconds
......@@ -9,7 +9,7 @@ Analysis::processExamResults()
int failures = 0;
int studentCounter = 1;
while (true) {
while (studentCounter <= 10) {
if (::isatty(STDIN_FILENO)) {
std::cout << "Enter result (1 = pass, 2 = fail): ";
}
......@@ -24,12 +24,10 @@ Analysis::processExamResults()
} else {
std::cout << "Wrong result, please insert 1 or 2: ";
}
if (11 == studentCounter) {
std::cout << "Passed " << passes << "\nFailed " << failures << std::endl;
if (passes > 8) {
std::cout << "Raise tuition" << std::endl;
}
return;
}
}
std::cout << "Passed " << passes << "\nFailed " << failures << std::endl;
if (passes > 8) {
std::cout << "Raise tuition" << std::endl;
}
return;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment