What am I doing wrong?
Hey guys..... here is my code:
import java.util.Scanner;
publicclass Test22
{
staticdouble celcius(int f)
{
return 5.0/9.0 * (f -32);
}
staticdouble fahrenheit(int c)
{
return 9.0/5.0 * c + 32;
}
publicstaticvoid main(String[] args)
{
Scanner input =new Scanner(System.in);
System.out.print("Enter "1" for Celcius to Fahrenheit or "2" for Fahrenheit to Celcius: ");
int choice = input.nextInt();
System.out.print("Enter degrees: ");
int degress = input.nextInt();
if (choice = 1)
{
System.out.println(degress +"C = " + fahrenheit(degrees) +"f");
}
else
{
System.out.println(degrees +"F = " + celcius(degress) +"C");
}
}
}
I am trying to make two integer methods for converting temp. Then I need to write an app that enables the user either to enter a F temp and display C, or vice versa. I can't get it to compile... it hangs on my first system.ouput line...
Thanks

