Donut question BMR


I need to see how many donuts (195 cals) a person can eat based on their BMR and display that along with the BMR
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
  // BMR lab 
#include <iostream> 
using std::cin; using std::cout; using std::endl; 

double bmrwoman(double, int, int);
double bmrman(double, int, int);



int main() {
	

	char gender;
	cout << " What is your gender male or female? " << endl;
	cout << " m = male" << endl; 
	cout << " f = female" << endl; 
	cin >> gender; 
	
	int weight, height, age; 
	cout << " Enter age" << endl;
	cout << " Enter weight" << endl; 
	cout << "Enter height " << endl; 

	if (gender == 'm' || 'M')
		 double bmrman();
	if (gender == 'f'|| 'F')
		double bmrwoman();

	cin >> weight >> height >> age; 
	
	double result;
	
	result = bmrwoman(weight, height, age);
	result = bmrman(weight, height, age); 
	cout << result << endl; 
}
 
double bmrwoman(double weight, int height, int age ){
	
	double result;
	result = 655 + (4.3 * weight) + (4.7 * height) - (4.7 * age);
	return result; 
}

double bmrman (double weight, int height, int age) {
	
	double result; 
	result = 655 + (4.3 * weight) + (4.7 * height) - (4.7 * age);
	return result; 
}
Last edited on
Topic archived. No new replies allowed.