title: I'm writing code to determine the state of water with if statements
body: <p>I'm writing code to determine the state of water depending on the temperature in celsius and altitude, how can I make it so at the end, if the altitude is more than 300, it takes 1 less degree celsius for the water to boil and the outcome can be determined depending on the input?</p>
  
  <pre><code>import java.util.Scanner;
  
  public class WaterState
  {       
      public static void main(String[] args)
      {
          boolean run = true;
          while(run)
          {
              Scanner scan = new Scanner(System.in);
  
              System.out.println("What is the temperature in degrees Celsius?");
              double temp = scan.nextDouble();
              System.out.println("What is the height above Sea level? in exact meters");
              double altitude = scan.nextDouble(); 
  
              int freezingPoint = 0;
              double alternateAltitude = temp - (altitude * 0.001);
              double boilingPoint = 100;
              int baseAltitude = 300;
  
              if ((temp &lt;= freezingPoint) &amp;&amp; (altitude &lt;= baseAltitude))
              {
                  System.out.println("Water is frozen");
              }
              else if ((temp &gt; freezingPoint) &amp;&amp; (altitude &lt;= baseAltitude))
              {
                  System.out.println("Water is liquid");
              }
              else if ((temp &gt;= boilingPoint) &amp;&amp; (altitude &lt;= baseAltitude))
              {
                  System.out.println("Water is gaseus");
              }
  
              else if ((altitudeChange &gt; )
              {  
  
                  System.out.println("Water is boiling, but at a lower temperature because of the altitude");
  
          }
      }
  }
  }
  </code></pre>