Prog48: BMI Categories
///Name: Ilana Levy
///Period: 5
///Program Name: BMI Categories
///File Name: bmiCategories.java
///Date Finished: 9/15/2015
import java.util.Scanner;
public class bmiCategories
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner( System.in );
int height, weight;
double bmi;
System.out.print( "You height in inches: " );
height = keyboard.nextInt();
System.out.print( "Your weight in pounds: " );
weight = keyboard.nextInt();
bmi = weight * 703/(height * height) ;
System.out.print( "Your BMI is " + bmi);
if ( bmi < 15.0 )
{
System.out.print(" BMI Cagegory: very severely underweight");
}
if ( bmi >= 15.0 && bmi<= 16.0 )
{
System.out.print(" BMI Cagegory: severely underweight");
}
else if ( bmi >=16.1 && bmi <= 18.5 )
{
System.out.print(" BMI Cagegory: underweight");
}
else if ( bmi >=18.5 && bmi <= 24.9)
{
System.out.print(" BMI Cagegory: normal weight");
}
else if ( bmi >= 25.0 && bmi <=29.9 )
{
System.out.print(" BMI Cagegory: overweight");
}
if ( bmi>= 30.0 && bmi <= 34.9 )
{
System.out.print(" BMI Cagegory: moderately obese");
}
if ( bmi >= 35.0 && bmi <=39.9 )
{
System.out.print(" BMI Cagegory: severely obese");
}
else if ( bmi >= 40)
{
System.out.println(" BMI Cagegory: morbidly obese");
}
}
}