Write Java applet which will ask the user to enter
Temperature in Fahrenheit. Your code should convert it into Celcius
and display the value to the user.
//FahrenheitToCelsius.java import java.util.Scanner; public class FahrenheitToCelsius { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.print("Enter temperature in Fahrenheit: "); double fahrenheit = scanner.nextDouble(); double celsius = (fahrenheit-32)*(5.0/9.0); System.out.println("Temperature in celsius = "+celsius); } }
Get Answers For Free
Most questions answered within 1 hours.