In: Computer Science
In order for exercise to be beneficial to the cardiovascular system, the heart rate (number of heartbeats per minute) must exceed a value called the training heart rate, THR. A person's THR can be calculated from their age and resting heart rate (pulse rate when first awakening) as follows:
Write a function called CalculateTHR that receives 2 parameters which represent a person's age and resting heart rate and it does not return anything back.
The function calculates and shows the THR value.
Calling the function.
Inside the main function, ask the user to input two values: Age and the resting heart rate.
Call the function CalculateTHR and pass to it as arguments the two values of the user.