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