Program To Calculate BMI With The C Programming Language

in #utopian-io7 years ago (edited)

What Will I Learn?

Making a program for calculating BMI

Requirements

Dev C++ 5.11

Difficulty

  • Basic

Tutorial Contents

This program can be help user to calculating his/her BMI.

the first one we must know
The Definition of Weight
Weight is a measure of the common or commonly used to assess the nutritional state of a human being. weight is a measure of the severity of the side body in weighed in a State of minimal dressing without any equipment. Weight is measured by measuring the weight of a unit of kilograms. By knowing the weight of a person then we will be able to estimate the level of a person's health or nutrition. Weight is recommended to measure the nutritional state of karma:
• easily visible changes in a short time
• Provide an overview of the State of nutrition in the present moment and when it is done periodically, i.e. once a month on the children will be able to give you a good overview about the growth of the child.
• the accuracy of the measurement is not affected by the skills measured.
• measuring instrument easily obtained

How to find (measure) weight
How to find someone's weight or measure is first of all me-weight scales number zero, hereafter the students rise above the scales and then we see the figure shows how the on the scales.
Understanding The BMI (Body Mass Index)
BMI (body mass index) or body mass index is a number stating the comparison of body weight (in kilograms) against the square of height (in meters). BMI is not a quantity so that it does not have a unit.

The Usefulness Of BMI
BMI is one of the indicators of the relative levels of body fat a person grown with age 20 years and over. BMI is used to • determine the status of a person's weight does someone have a too skinny body, ideal, or too fat. BMI helps assess the weight status of a person against the risk of health problems due to the lack or excess weight. BMI cannot be used for the diagnosis of the condition of one's health. Doctors use BMI to assess a person's weight status with regard to the risks of certain health problems. To diagnose the condition of a person, the doctor will perform a medical examination.

How To Calculate BMI
To find out a person's BMI, then it should be known in advance the weight (in kilograms) and height (in meters). Weight is measured by using the scales of the body, and the height is measured by the meter.

BMI and Weight Status
The BMI numbers too low show that someone is too thin so that it increases the risk of health problems. Too high a BMI figures show that a person is too fat so that it increases the risk of health problems. People who are too thin are advised to increase his weight to ideal weight range, so for people who are too fat are advised to reduce his weight to a normal weight range.

#include <stdio.h>
int main(){
float Hight;
float Weight;
float Size;
float BMI;
float Help;
float Kg;
printf("Input Your Height: "); scanf("%f",&Hight);
printf("Input Your Weight: "); scanf("%f",&Weight);
Size = (Hight-100)-(0.1(Hight-100));
printf("%f\n",Size);
Help=(Hight
0.01);
BMI=(Weight/(Help*Help));
printf("Your BMI Size is %f\n",BMI);
if(BMI<16){
Kg=Size-Weight;
printf("To get the ideal weight you have to add or subtract 5 from your %fKg\n",Size);
printf("%f Your BMI too Skinny\n",BMI);
printf("You must add your weight to %fkg\n",Kg);
}
else if(BMI<=16.99 && BMI>=16){
Kg=Size-Weight;
printf("To get the ideal weight you have to add or subtract 5 from your %fKg\n",Size);
printf("%Your BMI is Skinny\n",BMI);
printf("You must add your weight to %fkg\n",Kg);
}
else if(BMI<=18.49 && BMI>=17){
Kg=Size-Weight;
printf("To get the ideal weight you have to add or subtract 5 from your %fKg\n",Size);
printf("%f Your BMI is a bit Skinny\n",BMI);
printf("You must add your weight to %fkg\n",Kg);
}
else if(BMI<=24.99 && BMI>=18.50){
printf("%f Your BMI is Normal or ideal, preserve! \n",BMI);
}
else if(BMI<=29.99 && BMI>=25){
Kg=Weight-Size;
printf("To get the ideal weight you have to add or subtract 5 from your %fKg\n",Size);
printf("%f Your BMI is Too Weight let's lose weight don't just eat'\n",BMI);
printf("You must =subtract your Weight %fkilo\n",Kg);
}
else if(BMI<=34.99 && BMI>=30.0){
Kg=Weight-Size;
printf("To get the ideal weight you have to add or subtract 5 from your %fKg\n",Size);
printf("%f Your BMI Obesity class 1, too fat\n",BMI);
printf("You must lose your weight %fkilo\n",Kg);
}
else if(BMI<=39.99 && BMI>=35){
Kg=Weight-Size;
printf("To get the ideal weight you have to add or subtract 5 from your %fKg\n",Size);
printf("%f Your BMI obesity class 2, very-too fat\n",BMI);
printf("You must lose your weight %fkilo\n",Kg);
}
else if(BMI>=40){
Kg=Weight-Size;
printf("To get the ideal weight you have to add or subtract 5 from your %fKg\n",Size);
printf("You are so very very very fat");
printf("You must lose your weight %fkilo\n",Kg);
}
else{
printf("You are robot\n");
}
//printf("The Size to be ideal is %f \n",Size);

}

pj 2 no 1.jpg

pj 2 no 2.jpg

pj 2 result 01.jpg

pj 2 result 02.jpg

pj result 03.jpg

pj 2 result 04.jpg

pj 2 result 05.jpg

pj 2 result 06.jpg

pj 2 result 07.jpg

pj 2 result 08.jpg



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

@baixiian, Approve is not my ability, but I can upvote you.

thanks for your upvote.... please come again to my post.... :)

Your contribution cannot be approved because it does not follow the Utopian Rules.

A contribution with bad grammar will be rejected if the contents may be really hard to understand.
Machine translated tutorials will be rejected (not 100% sure this is the case for you).

I also think this can't really be considered a tutorial, as you just copy and paste the code and don't really explain anything. I recommend writing a tutorial in your own language and explaining step-by-step what you are doing and why.

You can contact us on Discord.
[utopian-moderator]

Coin Marketplace

STEEM 0.15
TRX 0.17
JST 0.028
BTC 68746.72
ETH 2456.17
USDT 1.00
SBD 2.43