Home > Back-end >  In c + + to calculate results
In c + + to calculate results

Time:09-20

C + + and 5 students in each class, each student taking five courses, 1) for each student's grade point average, and the output of each students, student id, each course grades and the average value, 2) average for a certain course, implementation requirements 1, write the above two function respectively

CodePudding user response:

Presence of bosses, save the children

CodePudding user response:

With the structure array

CodePudding user response:

 
#include
#include
#include

using namespace std;

Class stu {//to create a class -- student
Public:
int id;//student id
Int the first [10].
Int second [10].
Int third [10].
Int fourth [10].
Int at fifth [10].//are five courses
//can write a function in the class directly, use this pointer can
Void oep ()
{
//each student's grade point average; Output student id
}
Void MMPS () {
//an average time of each course
}
};
Stu lib.
  • Related