Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that calls a function to decide whether the average is a passing grade. Grade total and the number of grades is captured

Write a program that calls a function to decide whether the average is a passing grade. Grade total and the number of grades is captured in main and passed to the function: - Use a while loop to ask the user to enter the grades for as many assignments and/or tests they wish without restricting them to a specific number of grades. Hint: Use a negative grade as sentinel value (or wild card) to mark the end of input. - In the while loop, keep a running total and count of the number of grades as they are entered. - Call a function, outside the loop, to calculate the average, passing the total and count as arguments (in main) - Check the average, outside the loop in main, and let the student know if they have a passing grade. You can decide what passing criteria should be.

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_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

More Books

Students also viewed these Databases questions

Question

2. What potential barriers would you encourage Samuel to avoid?

Answered: 1 week ago