IN JAVA Complete the program below so that it prompts the user for a temperature value, followed by a character that represents the type of temperature: C for Celsius F for Farhenheit If the character represents Fahrenheit temperature (F), convert the temperature value to the equivalent value in Celsius, using the following formula:C = (5/9)(F - 32.0)where C represents the Celsius temperature value, and F represents the Farhenheit temperature value.   If the character represents Celsius temperature (C), convert the temperature value to the equivalent value in Farhenheit, using the following formula: F = (9/5)C + 32.0

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter6: Looping
Section: Chapter Questions
Problem 2PE
icon
Related questions
Question

IN JAVA

Complete the program below so that it prompts the user for a temperature value, followed by a character that represents the type of temperature:

  • C for Celsius
  • F for Farhenheit

If the character represents Fahrenheit temperature (F), convert the temperature value to the equivalent value in Celsius, using the following formula:C = (5/9)(F - 32.0)where C represents the Celsius temperature value, and F represents the Farhenheit temperature value.

 

If the character represents Celsius temperature (C), convert the temperature value to the equivalent value in Farhenheit, using the following formula:

F = (9/5)C + 32.0

Expert Solution
steps

Step by step

Solved in 2 steps with 1 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