title: Coding Bat Exercise BMIResult
body: <p>I am new to coding and am having issues with this problem any help is appreciated. </p>
  
  <p>Here is the problem.</p>
  
  <p>Given an individual's height in inches and weight in pounds, calculate their BMI. BMI is calculated as BMI = (weight*703)/(height*height) Then, based on their BMI, if it is less than 18.5, return a message that says "You are underweight." If it is at least and not more than 26, return a message that says "Your weight is healthy." If it is 26 or more, return a message that says "You are overweight."</p>
  
  <p>BMIResult(177, 69) → "You are overweight."</p>
  
  <p>BMIResult(125, 62) → "Your weight is healthy."</p>
  
  <p>BMIResult(95, 64) → "You are underweight."</p>
  
  <p>Hint: Round your BMI calculation to one decimal place. Be sure the message return is exactly as displayed.</p>
  
  <p>WHAT AM I DOING WRONG!!  This is the Error I am getting.</p>
  
  <p>Error:  public String BMIResult(double weight,double height) {</p>
  
  <p>^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  This method must return a result of type String</p>
  
  <p>Possible problem: the if-statement structure may theoretically 
  allow a run to reach the end of the method without calling return.
  Consider adding a last line in the method return some_value; 
  so a value is always returned.</p>
  
  <p>HERE IS MY CODE THAT GETS THE ERROR MESSAGE ABOVE:</p>
  
  <pre><code>public String BMIResult(double weight,double height) {
  double bmi=((weight*703)/(height*height));
  
  if (BMI&lt;18.5)
  
    return "You are underweight.";
  
  if (BMI&gt;18.5 &amp;&amp; BMI&lt;26)
  
    return "Your weight is healthy.";
  
  if (BMI&gt;=26)
  
    return "You are overweight.";
  
  
  
  }
  </code></pre>
  
  <p>Even if I try to convert from a double to a string it doesn't work.</p>