Help with a rookie's program!!

closed account (zCk2y60M)
I am a newcomer to a CS class on my campus and am having trouble starting to build one of my first assignments... I have a limited knowledge of HTML however am eager to learn. I have yet to see a program from scratch built by me in Codelite so this is why I bring it to the forum. Here's my instrucitons:

BACKGROUND

How many cookies can I eat? With all the pressure in today’s society about body weight, someone might want to know
how much of an item they could eat without putting on weight. In this case it’s cookies! The cookies that you like have
around 230 calories each. So how many of them can you eat in one day (assuming you eat nothing else)?
This algorithm uses the Harris-Benedict equation which estimates the number of calories your body needs to maintain
your weight if you do not exercise. This is called your basal metabolic rate, or BMR.
The BMR formula for a woman (or a man who is 65 years or older) who is lightly active is:
BMR = 1.375 * (655 + (4.3 * weight in pounds) + (4.7 * height in inches) - (4.7 * age in years))
The BMR formula for a man who is younger than 65 and is lightly active is:
BMR = 1.375 * (66 + (6.3 * weight in pounds) + (12.9 * height in inches) - (6.8 * age in years))


THE PROGRAM REQUIREMENTS

To decide how many cookies one could eat, the user must input:
 weight in pounds,
 height in inches,
 age in years, and
 gender as the character m for male or the character f for female. (Use only lowercase m or f).
Since we normally eat whole cookies and we do not want them to go over their weight maintenance limit, print out an
integer number of cookies to truncate the result. For example, if the computed number of cookies is 3.9, print 3 cookies.

Here is a sample interaction with the program (the user’s input is highlighted in blue):
Please provide your basic information
male or female (m or f)? m
age in years? 70
weight in pounds? 180
height in inches? 66
BMR = 1939.03
number of cookies that can be eaten = 8

Make sure that the BMR is printed with two (2) decimal points of precision.



Anyone think they can help me with this?
Topic archived. No new replies allowed.