Professional Documents
Culture Documents
Exer 2 PDF
Exer 2 PDF
BMI Calculator
Exercise Objectives:
Problem: Create a C program that will compute the body-mass index of a given height and
weight. After calculating the BMI, the program will also tell under which category (underweight,
normal weight, overweight, or obese) it belongs. At the sample run, the user is navigated into a
menu before entering the height and weight. The menu must loop repeatedly until the exit option
is entered. Make sure to have proper error prompts.
How to calculate your Body Mass Index? According to the US National Heart, Lung, and Blood
Institute. You may calculate your BMI into Metric and Standard.
Overweight 25-29.9
Sample run:
C $gcc -o exer2 exer2.c
C $./exer2
1 - Measure in metric
2 - Measure in standard
3 - Exit
1 - Measure in metric
2 - Measure in standard
3 - Exit
1 - Measure in metric
2 - Measure in standard
3 - Exit