title: my java bmi calculator giving the same answer
body: <p>i'm trying to make a bmi calculator but the answer keeps being the same.</p>
  <p>i tried putting numbers height=1.50 meter weight=100 kg
  but the answer was underweigth</p>
  <pre><code>public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      double bmi = 0;
      double weightinkg = 0;
      double heightinmeter = 0;
      String status = &quot;&quot;;
      System.out.println(&quot;Enter the weight in Kg :&quot;);
      weightinkg = sc.nextDouble();
      System.out.println(&quot;Enter the height in Meter : &quot;);  //enter the age
      heightinmeter = sc.nextDouble();
      if ((weightinkg &lt;= 0) &amp;&amp; (heightinmeter &lt;= 0))
          System.out.println(&quot;ERROR: Negative number&quot;);
      double square = Math.pow(heightinmeter, 2);
      bmi = weightinkg / heightinmeter;
      if (bmi &gt;= 0) {
          if (bmi &gt;= 0 &amp;&amp; bmi &lt;= 24) {
              status = &quot;Under Weight&quot;;
          } else if (bmi &gt;= 25 &amp;&amp; bmi &lt;= 29) {
              status = &quot;Healthy&quot;;
          } else if (bmi &gt;= 30 &amp;&amp; bmi &lt;= 34) {
              status = &quot;Overweight&quot;;
          } else
              status = &quot;Obese&quot;;
      }
      else
          System.out.println(&quot;Invalid BMI (number must be positive&quot;);
      System.out.printf(&quot;Hello, your status is %s ! Please come again!&quot;, status);
  }
  </code></pre>