BMR Calculator for chocolates

I'm somewhat new to programming and have been assigned to see how many chocolate bars it would take to eat in order to gain a pound. Assuming that the chocolate bar has 230 calories.
The BMR for men is 66 + (6.23 * weight) + (12.7 * height) - (6.8 * age);

and for women is 655 + (4.35 * weight) + (4.7 * height) - (4.7 * age);
Im just confused as the output I get doesn't really show how many chocolate bars it would take to gain 1 pound. Am I missing something important?

Any help is appreciated!!

I have the code as following

#include <iostream>
using namespace std;

int main ( )

{

double weight, height, age, sum, chocolates;
char gender;

cout << "Enter weight in pounds" << endl;
cin >> weight;

cout << "Enter height in inches\n";
cin >> height;

cout << "Enter age in years\n";
cin >> age;

cout << "Enter gender";
cin >> gender;

if ( (gender == 'm' || gender == 'M') )
{
sum = 66 + (6.23 * weight) + (12.7 * height) - (6.8 * age);
chocolates = (sum / 230);
cout << chocolates;
}
//so confused on this part
else
{
sum = 655 + (4.35 * weight) + (4.7 * height) - (4.7 * age);
chocolates = (sum / 230);
cout << chocolates;
}

cout << "\n";
return 0;

}
Are you sure 655 shouldn't be 65.5 ?
A bit of helpful advice....

PLEASE learn to use code tags, they make reading and commenting on source code MUCH easier.

http://www.cplusplus.com/articles/jEywvCM9/
http://www.cplusplus.com/articles/z13hAqkS/

HINT: you can edit your post and add code tags.

Some formatting & indentation would not hurt either
Registered users can post here. Sign in or register to post.