1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
katrin [286]
3 years ago
8

Write a program that convert a temperature in Fahrenheit to the equivalent temperature in Celsius. The initial temperature in Fa

hrenheit is to be entered at the keyboard. Both temperatures should be output to the screen.

Computers and Technology
1 answer:
baherus [9]3 years ago
5 0

<u>Answer:</u>

//import the necessary class

import java.util.Scanner;

//Begin class definition

public class ConvertToCelsius{

   

       //Begin main method

    public static void main(String []args){

       //Create an object of the Scanner class

       Scanner input = new Scanner(System.in);

       

       //Display the aim of the program

       System.out.println("**Program to convert from Fahrenheit to Celsius**");

       

       //Prompt the user to enter the temperature in Fahrenheit

       System.out.println("Please enter temperature in Fahrenheit");

       

       //Receive the user's input

       //And store in the appropriate variable

       double tempF = input.nextDouble();

       

       //Convert the temperature to Celsius using

       //C = (9.0 / 5) * (F - 32)

       //C = temperature in Celsius, F = temperature in Fahrenheit

       double tempC = (9.0 / 5) * (tempF - 32);

       

       //Display the result

      System.out.println("The temperature in degree Celsius is: ");

       System.out.println(tempC);

       

       return;

       

    }    //End of main method

}    //End of class definition

<u>Sample Output</u>

**Program to convert from Fahrenheit to Celsius **

Please enter temperature in Fahrenheit

>> 32

The temperature in degree Celsius is:  

0.0

<u>Explanation</u>:

The above code has been written in Java and it contains comments explaining important lines of the code. Please go through the comment. Snapshots of the program and a sample output have been attached to this response.

You might be interested in
What is your robloz?​
ira [324]

Answer:

my Ro.b.l.o.x is cookiefunny232

Explanation:

5 0
3 years ago
Sue is installing a printer. What program will she need to get the printer to work with her computer? Specify some functionaliti
umka21 [38]

Answer:

Utility software tool​

Explanation:

After connecting the printer and turning it on, you'll need to install the printers software and drivers. Every printer should come with the software used to install a printer in Windows or your operating system.

8 0
3 years ago
QUESTION 7
marishachu [46]
False, it needs to be properly cited because that is plagiarism which is illegal
6 0
3 years ago
What is the difference between a ROM chip and a RAM chip?
Leokris [45]

Answer:

A: A ROM chip is non-volatile and will keep its data in the case of a power failure. A RAM chip is volatile and will wipe its data in the case of a power failure.

Explanation:

ROM chips were widely used at the time of the old consoles, because with it you had an extremely fast and non-volatile memory, but this technology is very expensive and started to use CDs in the Consoles, while the RAM memory is a memory of execution random (RAM = RANDOM ACESS MEMORY).

4 0
3 years ago
Why is my computer getting slower and slower? What can i do without buying a virus scanner?
NeTakaya
It could be that your computer is simply getting older and more worn out, I suggest downloading MalwareBytes, it's a free anti-virus software that I use personally.
7 0
3 years ago
Read 2 more answers
Other questions:
  • Use the drop-down menus to complete statements about managing meeting responses.
    13·1 answer
  • During an engine's intake stage, what passages inside the cylinder head of a gasoline powered engine must the incoming air-and-f
    10·1 answer
  • Which of the following is a way to add a foreground to a photograph?
    7·2 answers
  • In Java please:Re-type the code and fix any errors. The code should convert non-positive numbers to 1. if (userNum &gt; 0) Syste
    10·1 answer
  • Suppose that x = 1565.683, y = 85.78, and z = 123.982. What is the output of the following statements? cout &lt;&lt; fixed &lt;&
    8·1 answer
  • How do you navigate multiple computer screen at one time?
    5·1 answer
  • A computer takes a lot of time to do complex calculation​
    9·1 answer
  • I have this questions i need to make it in a report format pages of atleast 3 pages and maximum of 5 pages​
    7·1 answer
  • Mohammed’s parents learn that his classmates have begun sending him text messages making fun of his heritage. Mohammed says he’s
    5·2 answers
  • When an AC voltage is being measured
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!