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 are some ways tables can be inserted into a document? Check all that apply.
wlad13 [49]

ioq8oy because of the haoss

Explanation:

6 0
3 years ago
Read 2 more answers
Which of the following statements are true regarding Steve Jobs and Steve Wozniak? Select 3 options.
Furkat [3]

Answer:

1. Both Steve Jobs and Steve Wozniak raised $1000 by selling personal items, so that they could start Apple.

2. Steve Wozniak worked for Hewlett Packard designing calculators before starting Apple.

4. Steve Jobs never learned to code and primarily focused on design.

Explanation:

I just took the test.

8 0
3 years ago
Read 2 more answers
Task 3&amp;4, please <br> with the formula
Anastasy [175]
It’s 12 because 3 times 4 is twelve, hope i helped!
6 0
3 years ago
How do I give brainliest to someone?
Nitella [24]
At the top of their name when they answer it should say “give brainliest”
6 0
3 years ago
Read 2 more answers
Unused neural connections in the brain are reduced through a process of
OLEGan [10]

Answer:

Pruning or remodeling

Explanation:

The brain is the major control system of animals. It acts just like the processor in a computer system. Brain development starts before childbirth and progresses to adulthood.

During the first few year of life, the neural and synapse connection multiply by millions, when the brain is mature enough, the brain begins to cut off connections of synapses, neurons and axons that are not used through the process called pruning or remodeling, which is very vital for brain development.

6 0
3 years ago
Other questions:
  • What materials where used to make the first gps
    7·1 answer
  • Which tab provide text formatting features
    11·1 answer
  • Which statement about the subject line is true? The subject line can be found just below the message box. The subject line is ma
    13·2 answers
  • A bluetooth device in ____ mode is part of the piconet but is in a low-power state.
    8·1 answer
  • I'm not sure how to do these. By the way, it has to be python.
    13·1 answer
  • Your task is to identify three or more ways that big data is being collected on a regular basis, including one data collection m
    9·1 answer
  • If you were an architect planning on building a large scale Municipal complex what type of engineer would you identify as essent
    10·1 answer
  • Difference between academic library and school Library
    5·1 answer
  • What is game development​
    10·2 answers
  • Which native windows application allows you to access basic pc settings and controls such as system information, controlling use
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!