Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C program Create a program that will display a menu to the user. use an array in this program and use the pointer notation to

C program

Create a program that will display a menu to the user. use an array in this program and use the pointer notation to traverse the array within the functions.The choices should be as follows:

1) Enter 5 student grades 2) Show student average (with the 5 grades) and letter grade 3) Show student highest grade 4) Show student's lowest grade 5) Exit

Use a switch statement for the menu selection and have it pick the appropriate function for the menu choices. Each option should be implemented in its own function. Initialize the grades randomly between 50-100. So if the user select show student average as their first choice, there will be some random grades in the list already.

Function1 : Ask the user for 5 grades and place them into an array that should be passed in as parameter, validate that the grades are in the range between 0-100 (use a loop). (use pointer notation to traverse the array)

Function2: Calculate the average of the 5 grades passed in and display the average with 1 decimal place and also display the letter grade.

Average

Letter Grade

90 100

A

80 89

B

70 79

C

60 69

D

Below 60

F

Function3: Have this function receive the array as a parameter and returns the highest grade to the main. The main will use that value to display it. Do not display in this function. (use pointer notation to traverse the array)

Function4: Have this function receive the array as a parameter and returns the lowest grade to the main. The main will use that value to display it. Do not display in this function. (use pointer notation to traverse the array)

Use a loop to repeat the entire program until the user hits 5 to exit.

Show your output!!!

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 Design And SQL For DB2

Authors: James Cooper

1st Edition

1583473572, 978-1583473573

More Books

Students also viewed these Databases questions

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago