Code
/// Name: Afaf Nabeeha
/// Period: 7
/// Program Name: BMI Calculator Part 1
/// File Name: BMI.java
/// Date Finished: 10/5/2015 public class BMI
import java.util.Scanner;
public class BMI
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
double m, kg, bmi, in, ft, lbs, cm;
System.out.print( "Your height in (feet only): " );
ft = keyboard.nextDouble();
System.out.print( "Your height in (inches) only): " );
in = keyboard.nextDouble();
m = ((ft * 12) + in) * 2.54 / 100;
System.out.print( "Your weight in pounds: " );
lbs = keyboard.nextDouble();
kg = lbs * .454;
bmi = kg / (m*m);
System.out.println( "Your BMI is " + bmi );
}
}
Picture of the output