Untitled
unknown
plain_text
2 years ago
764 B
4
Indexable
Never
#include <iostream> #include <iomanip> using namespace std; float mark, biggest, smallest, b_mark, s_mark, total; int judges, counter; int main () { cout << "Enter the number of judges: "; cin >> judges; while (judges < 4 || judges > 8){ cout << "Invalid. Please enter a number between 4 to 8\n"; cin >> judges; } /* Mark for the judges */ if (judges == 4){ for (counter = 0; counter < 4; counter++){ cout << "Enter mark between 0.0 to 10.0: "; cin >> mark; if (biggest < mark){ biggest = mark; total = total + mark; } } cout << "The biggest mark is " << biggest << endl; cout << total; } }