Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 2 [25 pts]: Write a Java program that Prompts the user to enter a value for temperature in Celsius, The program calculates the value
Question 2 [25 pts]: Write a Java program that Prompts the user to enter a value for temperature in Celsius, The program calculates the value of the temperature in Fahrenheit. fahrenheit = celsius * (9.0/5.0) + 32 If the temperature in Fahrenheit is less than 40 the program prints: It is cold. Otherwise, it will prints: It is hot. Finally, the program prints the temperature in Fahrenheit. Sample Run 1: Enter a value for temperature in Celsius: 4 It is cald. The temperature in Fahrenheit is: 39.2 Sample Run 2: Enter a value for temperature in Celsius: 35 It is hot, The temperature in Fahrenheit is: 95.0 Sample Run 3: Enter a value for temperature in Celsius: 20 The temperature in Fahrenheit is: 68.0 public class Temperature public static void main(String llargs)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started