Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started