I am having issues displaying the result for a calculation of Body Mass Index. I am uncertain as to why the bodyMassIndex variable is not performing the calculation and displaying the result. Thanks for any feedback.
// Write a Java program to compute body mass index (BMI).
public class Exercise3 {
public static void main (String [] args) {
// Variable Declaration
int height;
int weight;
double bodyMassIndex;
Scanner input = new Scanner (System.in);
// Obtain user input
System.out.println("What is your remaining height in inches: ");
height = input.nextInt();
System.out.println("What is your weight (in pounds): ");
weight = input.nextInt();
// Perform computations
bodyMassIndex = (weight / (height * height)) * 703;
// Display Results
System.out.println("Your Body Mass Index is: " + bodyMassIndex);
}
}