Question: Write a Java program (after declaring class and main() method) that coverts Celsius degree temperature to Fahrenheit and displays the result. The formula for the
Write a Java program (after declaring class and main() method) that coverts Celsius degree temperature to Fahrenheit and displays the result. The formula for the conversion is as follows: Fahrenheit =(9.0/5.0) Celsius +32 The temperature in Celsius should be taken as input from user using the Scanner class. The output of the program should be as shown below. The value of Fahrenheit should be calculated and printed at in the output shown below. The program should compile without errors if compiled on NetBeans. NOTE: When you take sereenshot of your program, the input you will give during runtime should be last four digits of your student id. e.g if your student id is 20191234 then the Celsius value as input in the screen shot should be 1234 . Output PleaseentertemperatureinCelsius=(takenfromtheuser)TemperatureinFahrenheitis=degrees Specifications - Declare variable temperature_Celsius, get value from the user and print first statement in output using this variable. (Marks 3) - Declare and calculate value of temperature_Fahrenheit variable using formula given above and print second statement of output. (Marks 7)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
