Preview:
package bodymassindex;

import java.util.*;

public class BodyMassIndex {
    //metric
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        System.out.print("Enter your Weight in pounds: ");
        double weight = sc.nextDouble();
        System.out.print( "Enter your Height in inch: ");
        double height = sc.nextDouble();    
        
        double BMI = 703 * (weight/Math.pow(height,2));
        
        System.out.println("Weight: " + weight);
        System.out.println("Height: " + height);
        System.out.println("BMI: " + Math.round(BMI));
    }
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter