title: Java error with a while and if statement
body: <p>Hi I'm new to Java and for my intro class I have to program something that does the following: <strong>Define a problem with user input, user output, While Statement and some mathematical computation.</strong></p>
  
  <p>What I want to do is have it prompt the user for feet and inches for height, if it's over 5'8 they can't go on the roller coaster; if it's 5'8 or less they can. I realize this would be much easier with like an if else kind of thing but I'm required to use while; also we haven't covered do while yet so I can't use that either. I'm probably messing up horribly and there's some better way to do this, but this is what I have so far.</p>
  
  <pre><code>import java.util.Scanner;
  
  public class coasterHeight
  {
     public static void main(String[] args)
     {
  
  
  Scanner keyboard = new Scanner(System.in);
  int feet;
  int inches;
  
  System.out.println ("Your must be at least 5'8 to ride this ride.");
  System.out.println ("Please enter your height in feet:");
  
   feet = keyboard.nextInt();
   System.out.println ("Please enter your height in inches:");
  
   inches = keyboard.nextInt ();
  
  
  
   while (feet &lt;= 5 &amp;&amp; inches &lt;= 8)
   {
   System.out.println("You can go on this ride.");
  break;
  }
  
  
   {
   if (feet &gt;= 6 &amp;&amp; inches &gt;=9)
  
   {
   System.out.println ("You cannot go on this ride.");
   }
  }
    }
  
  
   }
  </code></pre>
  
  <p>So here's the problem. When the input meets the while requirements it works fine (it used to go on an infinite loop with "You can go on this ride" but I discovered break;), but for the if statement, nothing appears in the output. The "You cannot go on this ride", nothing appears, there's no error or anything it just ends the output after I enter a height that is over 5'8. Like I said this is probably awful but any help would be appreciated, thanks.</p>