Formal Paramater assistance please.

ok, here's the thing, I can pretty much follow the instructor in class, but when I get home and try to complete the assigment, it's like I have rocks for brains. I am not stupid, I'm just having a difficult time with this beginning programming class.

I have an assignment to write a program that will compute the "Basal Metabolic Rate" or "Required Calories" for an individual to maintain their current body weight.

I have the program to the point that the user inputs their weight and on a scale of 1-20 the level of intensity they exert when exercising.

I need to set up a formal paramater for Basal Metabolic Rate, where
BasalRate = Calories Required = 70 * (P/2.2)0.756), where P = weight, this is entered by the user.

Anybody?, help!
thanks,

is it legal to post an email address in here?


Maybe this will help me explain what I'm trying to say:
*************************************************************************************/
//#include<iostream>
//#include<cmath>
//using namespace std;



i//nt main()

//{
double P;
double intensity;
double CalReq;
double basal_rate(70 * (P/2.2)0.756);

cout << "Enter your weight in pounds\n";
cin >> P;

cout << "Using a scale of 1-20, enter the number that best represents the"<<endl;
cout << "level of intensity you exert when you exercise.\n";
cin >> intensity;

cout << P << " is your weight " << intensity << " is your intensity level!\n";

WHERE DO I PUT MY FORMAL PARAMATER? I WANT BASAL RATE (BASAL_RATE) TO RETURN CALREQ FROM THE FORMULA (70 * (P/2.2)0.756) WHERE THE "P" IS EQUAL TO THE WEIGHT THE USER INPUTS.
// return 0;



}
Last edited on
1
2
3
4
double basal_rate(double p)
{
     return 70 * (P/2.2)0.756;
}
thanks
Topic archived. No new replies allowed.