Assignment #26 and BMICalculator
Code
/// Name: Jason Kim
/// Period: 7
/// Program Name: BMICalculator
/// File Name: BMICalculator.java
/// Date Finished:9/25/15
import java.util.Scanner;
public class BMICalculator
{
public static void main (String[] args)
{
Scanner keyboard = new Scanner(System.in);
double m, kg, inch, pound, bmi;
System.out.print( "Your height in inches: " );
inch = keyboard.nextDouble();
System.out.print("Your weight in pounds: " );
pound = keyboard.nextDouble();
m = 0.0254*inch;
kg = pound*0.45359;
bmi = kg / (m*m);
System.out.println( "Your BMI is " + bmi );
}
}
Picture of the output