Assignemnt #26 and BMI Calculator

Code


/// Name: David Shkolnikov
/// Period: 6
/// Program Name: BMI Calculator
/// File Name: BMICalculator.java
/// Date Finished: 10/6/2015

 
import java.util.Scanner;
 
 public class BMICalculator
 {
     public static void main( String[] args )
     {
         Scanner keyboard = new Scanner(System.in);
         double in, lb, bmi;
 
         System.out.print( "Your height in inches: " );
         in = keyboard.nextDouble();
 
         System.out.print( "Your weight in pounds: " );
         lb = keyboard.nextDouble();
 
         bmi = lb / (in*in) * 703;
 
         System.out.println( "Your BMI is " + bmi );
     }
 }

    

Picture of the output

Assignment 26 Assignment 26