import java.util.Scanner;
public class FHeightToCelsius {
public static void main(String[] args)
//Computes the Celsius equivalent of the inputted Fahrenheit value
//using the formula C=(F-32)*5/9
{
final int BASE = -32;
final double CONVERSION_FACTOR = 5/9;
Double message;
Scanner scan = new Scanner(System.in);
System.out.println("Enter A Fahrenheit:");
message = scan.nextDouble();
double CelsiusTemp;
CelsiusTemp = (message + BASE) * CONVERSION_FACTOR;
System.out.println("Your conversion is:" + CelsiusTemp);
}
}
Math isn't my strong suit, nor is problem solving (YET!!) What I also need help with is fleshing out and understanding if this formula is right or correct and how we come about that. I looked up the formula online, but, I'm not sure if I converted it right in code.
I cannot get the math formula to work.