Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

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

The C program that fulfills the requirements you specified The program uses dynamic memory allocation to create an array of student data calculates th... 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_2

Step: 3

blur-text-image_3

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

Introduction To Statistics And Data Analysis

Authors: Roxy Peck, Chris Olsen, Jay L. Devore

3rd Edition

0495118737, 9780495118732

More Books

Students also viewed these Programming questions

Question

2 Describe the main securities traded in a stock market.

Answered: 1 week ago

Question

1. What are differences between the terms sex and gender?

Answered: 1 week ago