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
vivado [14]
3 years ago
8

Make a program that (i) asks the user for a temperature in Fahrenheit degrees and reads the number; (ii) computes the correspond

ing temperature in Celsius degrees; and (iii) prints out the temperature in the Celsius scale.
Computers and Technology
1 answer:
Lerok [7]3 years ago
5 0
<h2>Answer:</h2><h2></h2>

//import the Scanner class to allow for user's input

import java.util.Scanner;

//Create a class declaration with appropriate name

public class FahrenheitToCelsius {

   //Begin the main method where execution starts from

   public static void main(String[] args) {

       //Create an object of the Scanner class to allow reading from standard

       // input

       Scanner input = new Scanner(System.in);

       

       //Prompt the user to enter the temperature

       System.out.println("Enter a temperature in Fahrenheit degrees");

       

       //Read the number and store in a variable of type double

       double fahrenheit = input.nextDouble();

       

       

       //Convert the temperature to Celsius

       double celsius  = (fahrenheit - 32) * (5 / 9.0);

       

       //Print out the result

       System.out.println("The temperature in Celsius is " + celsius);

       

   } //End of main method

   

}   //End of class declaration

==============================================================

<h2>Sample Output 1:</h2><h2 />

>> Enter a temperature in Fahrenheit degrees

32

>> The temperature in Celsius is 0.0

==============================================================

<h2>Sample Output 2:</h2><h2 />

>> Enter a temperature in Fahrenheit degrees

78

>> The temperature in Celsius is 25.555555555555557

===============================================================

<h2>Explanation:</h2>

The code has been written in Java and it contains comments explaining every segment of the code. Please go through the comments.

The actual lines of code are written in bold face to separate them from the comments.

Sample outputs have also been given to show how the result of the program looks like.

You might be interested in
Equity is proportional ownership in a firm. Which of the following is synonymous with Equity?
Andreas93 [3]
<span>A. Certificate of License</span>
8 0
3 years ago
The average lease payment for a new vehicle is just over $450 per month for a three-year...
hichkok12 [17]

Answer:

it depends on your insurance company

Explanation:

7 0
3 years ago
Arrange the steps for conflict resolution in proper sequence.
VashaNatasha [74]

1.Clarify what the disagreement is

2. Establish a common goal for both parties

3. Discuss ways to meet the common goal 

4. Determine the barriers to the common goal

5. Agree on the best way to resolve the conflict

6. Acknowledge the agreed upon solution and determine the responsibilities each part has in the resolution 

8 0
3 years ago
Read 2 more answers
An administrator needs to protect rive websites with SSL certificates Three of the websites have different domain names, and two
Marysya12 [62]

Answer:

Option A (One SAN certificate) is the right answer.

Explanation:

  • A vulnerability management certificate that permits many domain identities to be safeguarded by such a singular or unique certification, is considered a SAN certificate.
  • Though on the verge of replacing common as well as accepted security credentials with either of these de-facto certifications.

Other alternatives are not connected to the given scenario. Thus the above option is correct.

5 0
3 years ago
Are new MacBooks have shiny logo ?
tekilochka [14]
Unfortunately they dont.
6 0
3 years ago
Other questions:
  • ___ refers to all aspects of managing and processing information using computers and computer networks
    13·1 answer
  • Using tracking code, google analytics can report on data from which systems?
    7·1 answer
  • What type of firewall works on the Session layer that creates a connection and allows packets to flow between the two hosts with
    8·1 answer
  • Question 2 Unsaved Which of these is NOT an example of an emerging technology? Question 2 options: Sixth Sense Close Range Drone
    6·1 answer
  • Quick SearchLinks to an external site. lets you refine or narrow your search results using links on the right side of the screen
    5·1 answer
  • Graphs and charts are two different elements. True or False
    15·1 answer
  • Write a program in C++ or C that includes two different enumeration types and has a significant number of operations using the e
    15·1 answer
  • Taylor and Rory are hosting a party. They sent out invitations, and each one collected responses into dictionaries, with names o
    9·1 answer
  • These brainly bots need to stop!!
    14·1 answer
  • Transaction processing systems (TPSs) provide valuable input to management information systems, decision support systems, and kn
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!