import javax.swing.JOptionPane;
public class test{
public static void main(String args[]){
String numT = JOptionPane.showInputDialog(null,"Please enter a value.");
double num1 = Double.parseDouble(numT);
System.out.println("Fahrenheite = "+num1+"\nCelcius = "+convertFtoC( num1 ));
}
public static double convertFtoC ( double num1 ){
return ((5/9)*(num1-32));
}
}
why the value return is zero? hrm... can anyone point out my mistake? thanks