Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Diving: Diving is an exciting sport in the Summer Olympics. Let's learn a little about the judging process in the sport. For each dive, seven

image text in transcribed

Diving: Diving is an exciting sport in the Summer Olympics. Let's learn a little about the judging process in the sport. For each dive, seven judges award a score between 0 and 10, where each score may be a floating point value. The highest and lowest scores are thrown out and the remaining scores are added together. The sum is then multiplied by the degree of difficulty for that dive. The degree of difficulty ranges from 1.2 to 3.8 points. The total is then multiplied by 0.6 to determine the diver's score The Assignment: Write a program that allows a user to input the degree of dive difficulty and seven judges' scores and finally prints out the overall score for that dive. The program should ensure that all inputs are within the allowable data ranges Use an array to store the scores Your program must have at least 5 functions An CollectInput() function that collects numeric input with input validation "wrapped" into it. A function CollectScores () to collect all seven judges' scores 1. 2. Must utilize the CollectInput() function to ensure numeric values only entered Must check scores are in the right range (0-10) o o 3. A function to find and return the position of the smallest score in the set 4. A function to find and return the position of the largest score in the set 5. A function to find and return the sum of the remaining scores Note: Functions 3-5 should not be able to update the set of scores Include a loop in main() that lets the user repeat this computation for new input values again and again until the user says he or she wants to end the program. Note: Your program need not worry about duplicate max and min scores. In the case of duplicate max or min scores, simply toss out only one max and/or one min, and continue with the algorithm as usual

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

Step: 3

blur-text-image

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

Data Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

More Books

Students also viewed these Databases questions

Question

To realize business outcomes before and after HRM adoption.

Answered: 1 week ago

Question

1 What demand is and what affects it.

Answered: 1 week ago