Extra If problems
- Write a program which reads in a fish type (Trout, Bass, Pike), and the size in inches and prints out if the fish should be released. Note, a fish should be released if it is not as long as the size given in the table.
Species | Minimum Size Inches |
Trout | 7 |
Bass | 15 |
Pike | 24 |
- Problem number 9 page 240:
Use functional decomposition to write a C++ program that computes a dance competition score. There are four judges who mark the dancers in the range of 0 to 10, and the overall score is the average of the three highest scores. (The lowest score is excluded). Your program should output an error message instead of the average, if any of the scores are not in the correct range.
- Problem number 10 page 240
Use functional decomposition to write a C++ program that determines the median of three input numbers. The median is the middle number when the three numbers are arranged in order by size. However, the user can input the value in any order, so your program must determine which value is between the other two.