Skip to content
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.

Create bmi.cpp #757

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions bmi.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include<iostream>
using namespace std;

int main()
{

float bmi,w,h; //w=weight , h=height
cout<<"Please Enter your weight in Pounds : ";
cin>>w;
cout<<"Please Enter your Height in Inches : ";
cin>>h;
bmi=(w*703)/(h*h);
cout<<"Your BMI is : "<<bmi<<endl;

if(bmi>25)
cout<<"Overweight";
else if(bmi<25 && bmi>18.5)
cout<<"Optimal";
else
cout<<"Underweight";
return 0;
}