Coders Packet

BMI CALCULATOR IN C++

By Sahil Chutani

The Project is built in C++ using Atom Editor and MinGW Compiler. It Can Calculate both in kg/m2 and lbs/in2 to predict the body type.

This Project is designed with an Attractive Front-End on the Console Itself. The user can enter his details in any format he likes, and the output can be calculated.

OUTPUT CONSOLE

PROJECT EXECUTION

This Project is Executed in the following Steps:

  1. Enter Your choice to enter your height and weight in the kg/m2 units or lbs/in2
  2. Next, you must input your height and weight in your chosen format.
  3. Your BMI and your body type are printed. The Body type is decided on the following basis:

BMI CONDITION

BODY TYPE

BMI < 18.5

UNDERWEIGHT

18.5 <= BMI <= 25

NORMAL

25 < BMI < 30

OVERWEIGHT

BMI >= 30

OBESE

  1. Next, the user will be given choices that if he/she wants to continue or wants to exit.

        If the user wants to exit, then the program with stop. Else the Programme will restart from point 1.

 

FUNCTION USED

It has 5 functions (other than the main function), They are:

  • Void color()

This function is used to change the color of the output text on the Output Console.

  • Void head()

This function is used to print the top view of the program. This an attractive overview with the String "WELCOME TO BMI CALCULATOR" in the center.

  • Void choice_kg()

This function is used to Calculate and Print the BMI in the kg/m2 units.

  • Void choice_pound()

This function has been designed similarly to the previous function. The only difference in this function is that The Input must be entered in the lbs./in2 format.

  • Start()

This function has the order in which the above functions are called.

Download Complete Code

Comments

No comments yet