import java.util.Scanner;
public class CalculateBMI{
public static void main(String[] args){
//Formula BMI (kg/m2) = weight (kg) / height2 (m2)
Scanner input = new Scanner(System.in); //Scanner to make input work
System.out.print("Please input your weight in kg: "); //just a message
double weight = input.nextDouble(); //Get weight
System.out.print("Please input your height in meter: "); //just a message
double height = input.nextDouble(); //Get height
double output = (weight / (height * height)); //Calculate the result, even though I would probably do it directly within the System.out.println() rather than before, but for clarities sake.
System.out.println(output);
}
}