Untitled
user_0161571
plain_text
3 years ago
868 B
5
Indexable
#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;
}
if (smallest < mark){
smallest = mark;
}
total = total + mark
}
cout << "The biggest mark is " << biggest << endl;
cout << total;
}
}Editor is loading...