Students P11141


Statement
 

pdf   zip   main.cc

thehtml

Using the definition

struct Student { int idn; string name; double mark; // The mark is a value between 0 and 10, or -1 that represents NP bool repeater; };

implement the procedure

void information(const vector<Student>& stu, double& min, double& max, double& avg)

that computes the minimum mark (min), the maximum mark (max) and the average mark (avg) of all the students of the table stu that have taken the exam and that are not repeaters. If none of the students that has these requirements, the value of these parameters must be −1.

Observation You only need to submit the required classes; your main program will be ignored. Strictly obey the type definitions of the statement.

Information
Author
Jordi Petit
Language
English
Translator
Carlos Molina
Original language
Catalan
Other languages
Catalan
Official solutions
C++
User solutions
C++