I am getting an error in my code, and I do not know how to fix it. Write a program to calculate target heart rate during fitness training. This program has two functions: main and heartRateCalculator. Please do the following:
(a) In the main function, ask the user to enter age and resting heart rate.
(b) In the main function, invoke the heartRateCalculator function. Pass the age and resting heart rate as arguments.
(c) In the heartRateCalculator 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.
(d) Don’t forget to write the necessary function prototype statement.
1. dont use same name for function and variable
2. TargetHeartRate in heartRateCalculator() has to be declared.
3. have to be careful with case sensitive variables