Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In c + + following the desired formating and directions from the prompt, Write the definition of function with the prototype below bool pass (
In cfollowing the desired formating and directions from the prompt, Write the definition of function with the prototype below
bool passint tests int numTests;
The parameters tests contains the student's test scores and numTests is the number of elements in the array.
For the student to pass, the average of all test scores must be at least In addition, at least three fifths of the test scores must be strictly greater than and over four fifths of the scores must be at least For example, if there are five test scores ie numTests then three fifths of the test scores means three test scores and four fifths of the test scores means four test scores. Therefore we need AT LEAST three of of the test scores GREATER THAN and we need MORE THAN FOUR so all five test scores to be GREATER THAN OR EQUAL TO
To get a number equal to three fifths of the test scores rounded down use numTestsinteger division Similarly use numTests to get four fifths of the test scores. Special cases: Any test score of or negative means an automatic fail.
To avoid inefficiency and to get full credit, your should only use one loop. Also, do not use a nested loops.Write the definition of function with the prototype below
bool passint tests int numTests;
The parameters tests contains the student's test scores and numTests is the number of elements in the array.
For the student to pass, the average of all test scores must be at least In addition, at least three fifths of the test scores must be strictly greater than and over four fifths of the scores must be at least For example, if there are five test scores ie numTests then three fifths of the test scores means three test scores and four fifths of the test scores means four test scores. Therefore we need AT LEAST three of of the test scores GREATER THAN and we need MORE THAN FOUR so all five test scores to be GREATER THAN OR EQUAL TO
To get a number equal to three fifths of the test scores rounded down use numTestsinteger division Similarly use numTests to get four fifths of the test scores. Special cases: Any test score of or negative means an automatic fail.
To avoid inefficiency and to get full credit, your should only use one loop. Also, do not use a neesstteedd llooppss..
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