Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hello I need help with this question from the An Introductoin to Programming usi

ID: 3678246 • Letter: H

Question

Hello I need help with this question from the An Introductoin to Programming using Visual Basic 2012 book, particularly Chapter 5.1 Question E16. It's states:

Training Heart Rate: in order for exercise to b ebeneficial to the cardiovascular system, the heart rate (number of heart beats per minute) must exceed a vlue called the training heart rate, THR. A person's THR can be calculated from his or her age and resting heart rate (pulse rate when first awakening) as follows:

(a) Calculate the maximum heart rate as 220 - age.

(b) Subtract the resting heart rate from the maximum heart rate.

(c) Multiply the result in step (b) by 60%, and then add the resting heart rate.

Write a program to request a person's age and resting heart rate as input and display his or her THR.

Please answer this in Visual Basic language!

Explanation / Answer

Dim age As Double 'person's age
Dim rate As Double 'resting heart rate

Dim maxrate As Double = 220 - age
Dim ret As Double = maxrate - rate
Return ret * 0.6 + rate

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote