Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

#include #include using namespace std; void getTestScores ( double [ ] , int ) ; double getTotal ( const double [ ] , int )

#include
#include
using namespace std;
void getTestScores (double[], int);
double getTotal (const double[], int);
double getLowest (const double[], int);
int main()
{
const int SIZE =4;
double testScores[SIZE],
total,
lowestScore,
average;
cout fixed showpoint setprecision(1);
getTestScores(testScores, SIZE);
total = getTotal(testScores, SIZE);
lowestScore = getLowest(testScores, SIZE);
total -= lowestScore;
average = total /(SIZE -1);
cout "The average with the lowest score "
"dropped is " average ".
";
return 0;
}
void getTestScores(double scores[], int size)
{
int index;
for (index =0; index = size -1; index++)
{
cout "Enter test score number "
(index +1)": ";
cin >> scores[index];
}
}
double getTotal(const double numbers[], int size)
{
double total =0;
for (int count =0; count size; count++)
total += numbers[count];
return total;
}
double getLowest(const double numbers[], int size)
{
double lowest;
lowest = numbers[0];
for (int count =1; count size; count++)
{
if (numbers[count] lowest)
lowest = numbers[count];
}
return lowest;
}Line 1 contains a(n)
Lines 5,6, and 7 are examples of a(n)
Line 12 contains a(n)
Lines 19,21, and 23 are examples of a(n)
Line 29 is an example of a(n)
Line 44 is an example of a(n)
Line 35 is the start of a(n)
Line 40 is an example of a(n).
These are the optional answers for all of the questions
[Choose]
Mathematical operator
Loop
Preprocessor directive
File
Switch statement
If statement
Function definition
Input statement
Array declaration
Function Prototype
Function call
Output statement
Concatenation
Postprocessor directive
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

Ai And The Lottery Defying Odds With Intelligent Prediction

Authors: Gary Covella Ph D

1st Edition

B0CND1ZB98, 979-8223302568

More Books

Students explore these related Databases questions