write a program that converts a Fahrenheit temperature to Celsius. The design of this program is important as I want you to break your program into separate functions and have the main() function call these to do the work.

Respuesta :

Answer:

See the code snippet in the explanation section

Explanation:

import java.util.Scanner;

public class Question {

 public static void main(String[] args) {

   Scanner scan = new Scanner(System.in);

   System.out.println("Enter temperature in Fahrenheit: ");

   int inputTemperature = scan.nextInt();

   fahrenheitTemperatureToCelsius(inputTemperature);

 }

public static void fahrenheitTemperatureToCelsius(int fahrenheitTemperature){

   int celsiusTemperature = ((fahrenheitTemperature - 32)*5)/9;

   System.out.println("Temperature in Celsius = " + temperature);

}

}

Q&A Education