c++ 26. For optimal aerobic benefit, a person should maintain a heart rate betwe
ID: 3748598 • Letter: C
Question
c++
Explanation / Answer
#include <iostream>
using namespace std;
void mhr(int age, int rp){
int mhr = 220-age;
int upper = ((0.01*0.8) * (mhr-rp) )+ rp;
int lower = ((0.01*0.6) * (mhr-rp) )+ rp;
cout<<"Upper Bound: "<<upper<<endl;
cout<<"Lower Bound: "<<lower<<endl;
}
int main(){
int age=0, rp;
//Getting the age from user
cout <<"Enter your age: ";
cin>> age;
cout <<"Enter resting pulse rate: ";
cin>> rp;
//Calculating and printing out the upper and lower limits of heart rate
mhr(age, rp);
return 0;
}
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.