title: debugging a logic error in a module
body: <p>I'm having trouble with an assignment in my book.  I'm writing a super simple application that converts fahrenheit to celcius and vice versa.  Everything works perfectly, except that the module I wrote to convert fahrenheit to celcius keeps returning a zero.  I can't figure it out, I've been on debug in Eclipse, stepping through each step, and I can't figure out what is wrong with my f>c conversion  equation, or what else it could be.  Can anyone more experienced than me see the problem?  I'd really appreciate a look-over.  Thanks so much!</p>
  
  <pre><code>import java.util.Scanner;
  
  public class TemperatureConversions 
  {
  
      public static void main(String[] args) 
      {
          Scanner input = new Scanner(System.in);
          String initialType;
          double fahrenheit = 1;
          double celcius = 1;
          System.out.print("Would you like to enter a fahrenheit or celcius temperature for conversion? (f/c):  ");
          initialType = input.next();
          switch ( initialType )
          {
              case "f":
                  System.out.printf("Please input fahrenheit temperature:  ");
                  fahrenheit = input.nextDouble();
                  celcius = celcius (fahrenheit);
                  System.out.print("\n" + fahrenheit + "f converted to celcius is " +celcius + "c");
                  break;
              case "c":
                  System.out.printf("Please input celcius temperature:  ");
                  celcius = input.nextInt();
                  fahrenheit = fahrenheit (celcius);
                  System.out.print("\n" + celcius + "c converted to fahrenheit is " + fahrenheit + "f");
                  break;
              default:
                  System.out.printf("%s is an invalid input.  Please try again, and only input either 'f' or 'c'");
                  break;
          }
          System.out.printf("\nAdios Turd Nuggets");
      }
  
      public static double celcius(double f)
      {
          double c = 5 / 9 * (f - 32);
          return c;
      }
  
      public static double fahrenheit(double c)
      {
          double f = c * 1.8 + 32;
          return f;
      }
  }
  </code></pre>