Write a program to calculate target heart rate during


Write a program to calculate target heart rate during fitness training. This program has two functions: main and heart_rate_calculator.  Please do the following:

(a) In the main function, ask the user to enter age and resting heart rate.

(b) In the main function, call the heart_rate_calculator function.  Pass the age and resting heart rate as arguments.

(c) In the heart_rate_calculator function, write code to calculate target heart rate during fitness training with the following formula:

Target hart rate = (220 - age - resting heart rate) * 0.4 + resting heart rate

Display target heart rate.

The following is an example.

Enter age: 40

Enter resting heart rate: 70

Your target heart rate is 114.0

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Write a program to calculate target heart rate during
Reference No:- TGS02511919

Now Priced at $10 (50% Discount)

Recommended (97%)

Rated (4.9/5)