I got a prompt asking to covert from Fahrenheit to Celsius and it seem to compiled right and everything but the mathematical solution does not have the right decimal point. I tried everything I know please help. Example if you cal 72 F = 22.22 C...I got 72 F = 22.0 C. Here the program.
Code:
import java.util.Scanner;
public class Handout1Project5
{
public static void main(String[] args)
{
Scanner scannerObject = new Scanner(System.in);
System.out.println("Hello out there");
System.out.println("I will converts degrees Fahrenheit to Celsius for you.");
System.out.println("Enter a temperature in degrees Fahrenheit: ");
int user_Input;
double degrees_Output;
user_Input = scannerObject.nextInt();
System.out.println("You entered:" + user_Input);
degrees_Output = (((user_Input - 32) * 5) / 9);
System.out.println(user_Input + " degrees Fahrenheit" + " = " + degrees_Output + " Celsius");
System.out.printf("%d degrees Fahrenheit = %3.2f degrees Celsius %n", user_Input, degrees_Output);
}
}
