title: How to Calculate BMI in Java
body: <p>I'm writing a program that takes the users input for height and weight then calculates the Body Mass Index from this. It uses separate methods for height, weight and BMI, these methods are called from main. The problem I'm having is I have absolutely no clue how to put the input from weight and height methods into the BMI method. This is what the code looks like: </p>
  
  <pre><code>public class BMIProj {
      static Scanner input = new Scanner(System.in);
      public static int heightInInches()
      {
  
         System.out.println("Input feet: ");
         int x;
         x = input.nextInt();
         System.out.println("Input Inches: ");
         int y;
         y = input.nextInt();
  
         int height = x * 12 + y;
  
         return height; 
      }
  
      public static int weightInPounds()
      {
          System.out.println("Input stone: ");
          int x;
          x = input.nextInt();
          System.out.println("Input pounds ");
          int y;
          y = input.nextInt();
  
          int weight = x * 14 + y;
  
          return weight;
      }
  
      public static void outputBMI()
      {
  
      }
  
      public static void main(String[] args) {
  
          heightInInches();
          weightInPounds();
          outputBMI();
  
      }
  </code></pre>
  
  <p>Thanks in advance.     </p>