Honor Code Acknowledgment: ___________________
Then after throwing out high (9.0) and low (6.0) the remaining
scores total 8.0 + 8.0 + 7.5 + 7.5 = 31, and the average
is 31/4 = 7.75. A difficulty factor of 3.5 yields
a total score of 7.75 * 3.5 = 27.125.
Write a C++ function
RandomPhone() that returns a string
representing a valid, random phone number.
A valid phone number is defined as any 7-digit
integer that does not start with 0 or 1. The phone number is separated
into a three digit prefix and a four digit suffix.
For example, 411-9786 is a valid phone number, but 005-6789
(which starts with 0) and 116-7865 (starts with one) are not valid
phone numbers.
Examples of calls to RandomPhone() include
The output for the above code segment could be:
The output for the above code segment also could be:
Problem 1: 10-meter mania (4 points)
Write a function to calculate and return the overall score of a dive.
The overall score is calculated by throwing out the high and low
individual scores, then averaging the remaining individual scores and
multiplying the average by a difficulty factor. For example, if six
individual scores are:
8.0 7.5 8.0 9.0 6.0 7.5
Problem 2: Operator, can you help me? (4 pts)
345-8794
983-1478
999-9999
200-0000