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
Why was 1990 an important year regarding air quality?
fredd [130]

Explanation:

The United States created the Environmental Protection Agency. in some ways they have did that

4 0
3 years ago
Read 2 more answers
File names should describe what is in the file in a few words
JulijaS [17]

Answer

File names should describe the content of the file.

Explanation

File names are set of words  which are used to uniquely identify computer files which are stored in a file system. This helps one to know the contents of the file which you want to find. When you name these file names you use necessary characters you use descriptive words so that you dont have hard times when searching for them. The naming also is determined by the file system you are using because different systems impose different restrictions on the length of the file names and the allowed characters within file names.

3 0
3 years ago
What is the cheapest type of printer to buy and run?
myrzilka [38]
It depends solely on how much you will use it. For example, laser printers are more suitable for offices, schools, and environments, where the printer is used almost constantly. If it's used a lot, you're probably looking at a laser printer, since the cartridges have a slightly higher price, but a much higher yield. If you can't afford a laser printer, and you're only going to use it at home, you're probably looking at an inkjet. If you need to print off something for school, ask your teacher, or someone that works at your school. Some secondary/high schools might allow you to use their printers at a lower price
7 0
3 years ago
Read 2 more answers
What are the two major types of sas steps?
QveST [7]

The two major SAS steps are data and proc.

SAS programming structure is based on two essential steps, Data and Proc.

1. The DATA step:

This involves collecting and uploading the essential data to the program memory. It is used to update, modify and edit the data in case of any errors once it has been added to a dataset. New datasets can be created from existing ones by updating, editing, and/or merging them. at the end of this step, SAS data sets are created.

2. The PROC step:

This step processes and analyses the data collected into datasets in the previous step. it is used to perform specific functions on the data. at the end of the proc step, a result or report is produced.

In a SAS code, each line of code should begin either with a DATA or PROC step.

<u>While the other options are incorrect because: </u>

<u />

  • Analysis: analysis is done in the PROC step.
  • Content: Data or content is collected in the DATA step.
  • Stat: a stat function acquires the status information regarding a specific file. Functions are performed on the datasets in the PROC step.
  • Run: This command is used to execute a code.
  • Import: Datasets are created by importing data from other datasets and outside.
  • Print: the report produced at the end of the PROC step can be printed as a hard copy.

You can learn more about SAS at

brainly.com/question/13615203

#SPJ4

8 0
2 years ago
State what’s printed for each println in the code below:
allochka39001 [22]

Answer:

Explanation:

Each of the following println statements will print the following values

ystem.out.println(floozy); // Problem 1:   97.4

System.out.println(theObj.gravy); //Problem 2:  107.43

System.out.println(xray[2]); //Problem 3:  100

System.out.println(s); //Problem 4: Hello

This is because out of all of the variables that the myMethod gives a value to, the only variable that is being saved back to the global variable in the main method is a[2]. The other variables are being saved as instance variables and not being returned. Therefore, when the println statements are called they target the local variables in the main method.

7 0
3 years ago
Other questions:
  • Which answer best describes an unsubsidized federal loan
    9·1 answer
  • Write a program that accepts a number as input, and prints just the decimal portion.
    6·2 answers
  • Which statement is used to create a file object that will append data to an existing file? BufferedWriter salesdata =
    7·2 answers
  • Chill and text part 2<br><br> (TEST) How do i copy apex questions
    10·2 answers
  • Help please! Coding!
    9·1 answer
  • How Can I add a image in an HTML program?​ please tell
    6·1 answer
  • Select one of the wrong answer from question 1 and explain why it is ironic.
    7·1 answer
  • Name the application used for creating Presentations___
    5·2 answers
  • A company database needs to store information about employees (identified by ssn, with salary and phone as attributes), departme
    7·1 answer
  • Tina has taken the time to modify font sizes and colors in a text box and would like to duplicate those settings on other text b
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!