BMICAT
Code
import java.util.Scanner;
public class BMICAT
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
int a, b, bmi;
System.out.println( " Your height in m " );
a = keyboard.nextInt();
System.out.println( " Your weight in kg " );
b = keyboard.nextInt();
bmi = b / (a*a);
System.out.println( " Your BMI " + bmi );
if ( bmi < 18.5 )
{
System.out.println( " underweight " );
}
if ( bmi > 18.5 && bmi < 24.9 )
{
System.out.println ( " normal weight " );
}
if ( bmi > 25 && bmi < 29.9 )
{
System.out.println( " overweight " );
}
if ( bmi > 30 )
{
System.out.println( " obese " );
}
}
}
BMICAT