Question: Need help with task 2&3 /* This program finds the lowest of the four test scores using a function. #include using namespace std; //Complete the

Need help with task 2&3

Need help with task 2&3 /* This program finds the lowest ofthe four test scores using a function. #include using namespace std; //Completethe function prototype of findLowest () int main() { float score1, score2,score3, score4; //validate scores do { cout > scorel; } while (scorel

/* This program finds the lowest of the four test scores using a function. #include using namespace std; //Complete the function prototype of findLowest () int main() { float score1, score2, score3, score4; //validate scores do { cout > scorel; } while (scorel 100); do { cout > score2; } while (score2 100); do { cout > score3; } while (score3 100); do { cout > score 4; } while (score4 100); //call function findLowest() to compute the lowest score //display the lowest score return 0; } // This function finds and returns the lowest of the four test scores // passed to it. float findLowest (float 31, float 32, float 33, float 34) { //complete this function [Hint for finding the lowest score] 1. assume lowest = sl; 2. check if s2 is lower than lowest. If so, reset lowest = s2; 3. repeat the step 2 for other scores. Task2 Modify the program in Taskl to use functions to process input and output as well. Your program should follow the structure chart as below: Main getScores displayRusult findLowest where a getScore () asks the user for given below: a test score and outputs them. It is where a test score and outputs them. It is getScore () asks the user for given below: float getScore () { float score; //validate score do { cout > score; } while (score 100); return score; CSCI 201 Computer Science 3 displayResult() displays the four test scores and the lowest score as follows: The four scores are 89, 93, 76 and 55. The lowest score is 55. Task3 Modify the program in Task2 to calculate the average of four test scores with the lowest score dropped. Your program should follow the structure chart as below: Main getScores displayRusult calcAverage findLowest where calcAverage () calculates the average of the three highest scores. The function calls the function findLowest() to calculate the lowest score as shown in the chart. An example of test run of task3 The output of your program might look like this: csci>a.out Enter a test score between 0 and 100: 112 Score must be in the range 0 100. Please re-enter score: 73 Enter a test score between 0 and 100: 67 Enter a test score between 0 and 100: 83 Enter a test score between 0 and 100: -20 Score must be in the range 0 - 100. Please re-enter score: 55 After dropping the lowest test score, the test average is 74.33 Thanks for using our system

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!