# Answer to Question #58212 in Java | JSP | JSF for tela

Question #58212

A line to randomly select a number between -10 and 120 for the Fahrenheit temperature

A line to convert the Fahrenheit temperature to Celsius

A line to convert the Fahrenheit temperature to Celsius

Expert's answer

import java.util.Random;

public class FahrenheitCelsius {

public static void main(String[] args) {

Random random = new Random();

int deegr = random.nextInt(130) - 10; // random number between -10 and 120 for the Fahrenheit temperature

double celsiusDeegr = (double) (deegr - 32) * 5 / 9; // convert the Fahrenheit temperature to Celsius

}

}

public class FahrenheitCelsius {

public static void main(String[] args) {

Random random = new Random();

int deegr = random.nextInt(130) - 10; // random number between -10 and 120 for the Fahrenheit temperature

double celsiusDeegr = (double) (deegr - 32) * 5 / 9; // convert the Fahrenheit temperature to Celsius

}

}

Need a fast expert's response?

Submit orderand get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

## Comments

## Leave a comment