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]
2 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]2 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
To remove an embedded chart, you should _____ it and press the DELETE key. (Points : 2) move drag hide click
Readme [11.4K]
I think the answer would be "click" 
3 0
2 years ago
The Quake, One of the first fully 3D games was released in the year? 1986 1996 1995​
kipiarov [429]
It was released in 1996
5 0
3 years ago
Question 1
Ivanshal [37]

Answer:

Q1. B

Q2. D

Explanation:

3 0
2 years ago
Read 2 more answers
Jesse is writing a physics quiz about the motion of a roller coaster cart. He has a clip art illustration of a cart rolling hori
Aleks04 [339]
<span>editing the image file in a dedicated photo editing program before inserting it</span>
8 0
3 years ago
You configure a Windows laptop for a user who frequently travels and must connect to several wireless networks. While at a new b
aliina [53]

Answer:

Turn on file and printing sharing for all networks.

Explanation:

Windows has several security features when connecting to a network. In the control panel, you can access to Network and internet > Network and sharing center > Advanced sharing options. There you will see 3 different profiles, one for private networks, one for guest or public networks, and one for all networks.

You should take one of the 2 options. Enable file and printer sharing for all networks, so he can just print without doing anything more. Or keeping the print sharing just for private networks, and adding his new branch office's network to the private networks list.

8 0
3 years ago
Other questions:
  • 3.14 LAB: Simple statistics for Python
    7·1 answer
  • To help determine which technology to use, Raul creates a table to help him compare the pros and cons of his choices. What part
    15·1 answer
  • Can somebody explain me what this code does in a few or one sentence?#include #include using namespace std;int main () { const i
    12·1 answer
  • Write a program that asks the user to enter the amount s/he has budgeted for a month. The amount should be between 1000 and 2000
    11·1 answer
  • _______ are special incentives or excitement-building programs that encourage consumers to purchase a particular product, often
    7·1 answer
  • The principle of time preference requries a larger payment in the future than the present. Which situation best illustrates this
    12·1 answer
  • A ______ is a computer that controls access to the hardware, software, and other resources on a network. mainframe server workst
    10·1 answer
  • Is media good for the brain?
    7·2 answers
  • Select the correct answer.
    9·1 answer
  • Which types of attacks are thwarted by complex passwords that are combinations of upper and lower case letters, numbers, and spe
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!