Coders Packet

Basal Metabolic Rate (BMR) Calculator using C++

By Akshay Sai Reddy Kondu

This project is built in C++ using conditional statements for finding the Basal Metabolic Rate (BMR). It calculates BMR in 'kCal/day' by using the Harris-Benedict formula.

The attached code is a C++ code to find the BMR. It takes details such as Height, Weight, Age, Gender, and physical activity level as input, and calculates the BMR in 'kCal/day' by using the Harris-Benedict formula.

Harris-Benedict formula:

BMR for Male: [66.47+(13.75*weight)+(5.003*height)-(6.755*age)]*(physical activity constant)

BMR for Female: [655.1+(9.563*weight)+(1.85*height)-(4.676*age)]*(physical activity constant), where the physical activity constant depends on your physical activity.

                       Physical Activity                                                                  Physical Activity Constant

i) Sedentary (Little or No exercise)                                                                 1.2

ii) Lightly active (Light Exercise or Sports:1-3 days/week)                                1.375

iii) Moderately Active (Moderate Exercise or Sports:3-5 days/week)                  1.55

iv) Very Active (Hard Exercise or Sports:6-7 days/week)                                  1.725

v) Extra Active (Very Hard Exercise or Sports and Physical Job)                        1.9

 

The program is executed in the following steps:

1. The program first asks the user to enter his choice, in which system he/she wants to enter their data i.e., Metric System (kg, cm) or in English System (lbs, in).

2. Then the user needs to enter his/her details such as height, weight, age, gender, and activity level.

3. By using the 'switch statement', it checks the activity level entered by the user and chooses the respective physical activity constant for calculating BMR.

4. Your Basal Metabolic Rate (BMR) is displayed in 'kCal/day'.

OUTPUT IN CONSOLE:

                                     OUTPUT

Download project

Reviews Report

Submitted by Akshay Sai Reddy Kondu (akshaysrkondu)

Download packets of source code on Coders Packet