Answered step by step
Verified Expert Solution
Link Copied!

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 c++following the desired formating and directions from the prompt, Write the definition of function with the prototype below
bool pass(int 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 70. In addition, at least three fifths of the test scores must be strictly greater than 65 and over four fifths of the scores must be at least 50. For example, if there are five test scores (i.e. numTests =5) 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 65 and we need MORE THAN FOUR (so all five) test scores to be GREATER THAN OR EQUAL TO 50.
To get a number equal to three fifths of the test scores (rounded down), use 3** numTests/5(integer division). Similarly use 4** numTests/5 to get four fifths of the test scores. Special cases: Any test score of 0 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 pass(int 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 70. In addition, at least three fifths of the test scores must be strictly greater than 65 and over four fifths of the scores must be at least 50. For example, if there are five test scores (i.e. numTests =5) 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 65 and we need MORE THAN FOUR (so all five) test scores to be GREATER THAN OR EQUAL TO 50.
To get a number equal to three fifths of the test scores (rounded down), use 3** numTests/5(integer division). Similarly use 4** numTests/5 to get four fifths of the test scores. Special cases: Any test score of 0 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..
image text in transcribed

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

Database Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

More Books

Students also viewed these Databases questions

Question

What is a verb?

Answered: 1 week ago

Question

Identify conflict triggers in yourself and others

Answered: 1 week ago