Assignment #26
Code
///Name: Jack Newsom
///Period: 5
///Program Name: BMICalc
///Filename: BMICalc.java
///date completed: 9/21/15
import java.util.Scanner;
public class BMICalc
{
public static void main( String[] args )
{
Scanner bmibot = new Scanner(System.in);
double ft, in, h, m, lb, kg, bmi;
System.out.println("Your height (feet only): " );
ft = bmibot.nextDouble();
System.out.println("Your height (inches): ");
in = bmibot.nextDouble();
System.out.println("Your weight (pounds): ");
lb = bmibot.nextDouble();
h = ft*12 + in;
m = h*.0254;
kg = lb*.453592;
bmi = kg / (m*m);
System.out.println("Your BMI is " + bmi );
}
}
Picture of the output