1. Write a program that reads a Celsius degree in a double value from the console, then converts it to Fahrenheit and displays the result. The formula for the conversion is as follows: fahrenheit - (9 / 5) * celsius + 32 Hint: In Java, 9/5 is 1, but 9.0/5 is 1.8. A sample run: Enter a degree in Celsius: 43 utrter 43 Celsius is 109.4 Fahrenheit

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 15PE
icon
Related questions
Question
1. Write a program that reads a Celsius degree in a double value from the console, then
converts it to Fahrenheit and displays the result. The formula for the conversion is as
follows:
fahrenheit
(9 / 5) * celsius + 32
Hint: In Java, 9/5 is 1, but 9.0 /5 is 1.8.
A sample run:
Enter a degree in Celsius: 43 JEnter
43 Celsius is 109.4 Fahrenheit
Transcribed Image Text:1. Write a program that reads a Celsius degree in a double value from the console, then converts it to Fahrenheit and displays the result. The formula for the conversion is as follows: fahrenheit (9 / 5) * celsius + 32 Hint: In Java, 9/5 is 1, but 9.0 /5 is 1.8. A sample run: Enter a degree in Celsius: 43 JEnter 43 Celsius is 109.4 Fahrenheit
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT