Students

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 minimal mark (|min|), the maximal mark (|max|) and the
average mark (|avg|) of all the students of the table stu that have
taken the examn and that are not repeaters. If there is not any student
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.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T22:06:35.353Z

© Jutge.org, 2006–2026.
https://jutge.org
