title: States of Water - Celsius and Fahrenheit Java
body: <p>Basically the task is : I should input a temperature value followed by a blank and the letter C for Celsius or F for Fahrenheit, for example: "-12 C" or "165 F" and the output should be what state water is in at the entered temperature.  The melting point of ice is for this exercise at 32 F and the boiling point of water is at 212 F. I am stuck on how to get the input of Celcius OR Fahrenheit and how to update the code below of mine to suit the boiling points of the Fahrenheit as well. My code so far: </p>
  
  <pre><code>public static void stateOfWater(){
       System.out.println("Please enter a temperature value in Celcius or Fahrenheit : ");
      Scanner input = new Scanner (System.in);
      int x = input.nextInt(); 
  
      if (x &lt;= 0)
          System.out.println("Water is solid at " + x );
  
      else if (100 &lt;= x )
          System.out.println("Water is gaseous at " + x );
  
      else 
          System.out.println("Water is liquid at " + x  );
      input.close();
  
      }
  </code></pre>
  
  <p>Thank you :).</p>