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
In which technique does a group rate or rank a set of information, compile the results and repeat until everyone is satisfied wi
garik1379 [7]
The correct option is DELPHI. Delphi technique is a structured and systematic method used in forecasting. The method often involve sending several rounds of questionnaires to experts. The anonymous responses are then gathered together and shared with the concerned group after each round of answers are received. 
5 0
3 years ago
How do you use the Internet? Think about your typical day. When are you using the Internet? For what purposes? What role does it
gladu [14]

Answer:

I would say something like this:

I use the internet mainly for communication, school and all the necessary informations. It has become a routine thing for every person on the planet. People are able to progress in almost all spheres of life. It can link people from all over and create communities.

5 0
4 years ago
It skills which move well between industries are considered?
Butoxors [25]

Answer:

They are termed as ethics. But remember different industries have a different set of ethics or rules that they expect their employees to follow. However, some that go well with all are common to all. And they are the standard ethics that are followed by all the industries. Failing to these is never expected.

Explanation:

Please check the answer section.

6 0
3 years ago
What is the purpose of a macro in a word processor?
Natali [406]
C : to determine error rate
8 0
3 years ago
Read 2 more answers
What do you understand by animation?How is it helpful in a presentations?​
aleksandrvk [35]

Answer:

Animation can help make a PowerPoint presentation more dynamic, and help make information more memorable. ... Animation can be useful in making a presentation more dynamic, and help to emphasize points, but too much animation can be distracting. Do not let animation and sound take the focus away from what you are saying.

Explanation:

TWACB

3 0
3 years ago
Other questions:
  • One thing we might want to know, given an input to a chatbot, is if the input is a question.
    10·1 answer
  • Why do computers use zeros and ones? a. because combinations of zeros and ones can represent any numbers and characters b. becau
    6·1 answer
  • How to make changes to a file on the USB drive
    6·2 answers
  • What is the origin of the name “breadboard”?
    8·1 answer
  • Obtaining the data of a video file from a flash drive is an example of a(n) _________ operation.
    6·1 answer
  • If the executives for Office Max LLC, a chain of office supply stores, developed the chain's objectives by asking buyers and sto
    11·1 answer
  • A computer scientist creates an app that tells you a funny joke each time you touch the Joke button.
    15·1 answer
  • Full form of computer
    12·1 answer
  • Analyze the code and identity the value of variable a,b and c after the code execution. int a=40, b=50, c=60; if(! (a&gt;=40)) b
    15·1 answer
  • Httpsdiscord.ggBVNuFMgG link is here<br>come and join discord​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!