Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedUse C++ 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Theory Icdt 97 6th International Conference Delphi Greece January 8 10 1997 Proceedings Lncs 1186

Authors: Foto N. Afrati ,Phokion G. Kolaitis

1st Edition

3540622225, 978-3540622222

More Books

Students also viewed these Databases questions