Home / Expert Answers / Computer Science / write-in-cpp-code-please-write-a-c-program-that-takes-as-inputs-from-a-teacher-the-names-of-her-pa592

(Solved): Write in cpp code please Write a C++ program that takes as inputs from a teacher, the names of her/ ...



Write a C++ program that takes as inputs from a teacher, the names of her/his students along with the grade of each student iWrite in cpp code please

Write a C++ program that takes as inputs from a teacher, the names of her/his students along with the grade of each student in an exam. Define a struct with two fields: Name and Grade. In your program, the main function creates an array of this struct to store the students' data. All grades are integers that have to be in the range from 0 to 100 (inclusive). Assume no two grades have the same value and there are at least six students in the class. At the beginning, you will need to ask the teacher for the size of the class (the number of students) and use dynamic memory allocation to create the array. The program will display (as its outputs) the following: 1. The average and median of the students' grades. 2. The name and grade of the three students with the maximum three grades. 3. The name and grade of the three students with the minimum three grades. Each one of the above four outputs must be implemented in a separate function where the array is passed to these functions as a parameter. Do not use any global variables in your program.


We have an Answer from Expert

View Expert Answer

Expert Answer


Code in cpp language answer: #include #include struct Student { std::string name; int grade; }; //function to calculate the ave
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe