Cardio Zone Unscramble

Download the following code, and get it to compile. The code I am giving you contains all the correct code but in a mixed-up order. Change only the order of the lines so that things work as expected.

Files Needed

(Do not re-type this program. Simply download a copy of the file by right-clicking and choosing "Save link as..." from the context menu. Save it into your normal code folder.)

Do not change any of the lines of code. Only change the order of the lines. (You may add blank lines if you want, but you may not add any other code.)

A person's "maximum" heart rate can be estimated by subtracting their age from 220. The "cardio zone" heart range ranges from 60% to 80% of their maximum heart rate.

What You Should See

Age: 41
The maximum heart rate for a 41-year-old is 179
The "cardio zone" is from 107.0 to 143.0 bpm.



©2013–2015 Graham Mitchell

This assignment is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.
Creative Commons License