3 questions:
BMI is calculated in the following way.
BMI = weight in pounds x 703 height in inches x height in inches
Give the following advice.
BMI 25.0 and above Exercise more Less than 25.0 You have a healthy weight
Test your algorithm using the following 2 cases.
height: 67 weight: 120
Outputs are 19.79
You have a healthy weight
height: 67 weight: 200
Outputs are 31.32
Exercise more
Hint: Use 2 boxes to store the youngest and oldest ages. What would you put in these boxes at the beginning?
Test your algorithm using a table with the following 4 cases. Make one table for each test. You will have 4 separate tables.
Age Age 0 Num Total + AgeTotal Youngest Oldest Avg
Outputs should be 8.75 (average age) 20 (oldest) 0 (youngest)
Outputs should be 102.5 (average age) 105 (oldest) 100 (youngest)
Outputs should be 50 (average age) 50 (oldest) 50 (youngest)
Outputs should be No ages were entered
Test your algorithm using a table with the following 2 cases. Make one table for each test. You will have 2 separate tables.
Repetition# Score Score < 0
Enter a score: -10 Invalid score. Enter a score: -50 Invalid score. Enter a score: -35 Invalid score. Enter a score: 20 Enter a score: -30 Invalid score. Enter a score: 60 Enter a score: -40 Invalid score. Enter a score: 40 Enter a score: 30 Enter a score: 15
The total score is 165 The average is 33
Enter a score: 25 Enter a score: 55 Enter a score: 0 Enter a score: 80 Enter a score: 30
The total score is 190 The average is 38
Due in 12 hours