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
Task 5: Create the GET_CREDIT_LIMIT procedure to obtain the full name and credit limit of the customer whose ID currently is sto
lidiya [134]

The SQL statement that would create the GET_CREDIT_LIMIT procedure to obtain the full name and credit limit of the customer is:

GET_CREDIT_LIMIT

SELECT CUST_ID 125

FROM FIRST_NAME, LAST_NAME, CREDIT_LIMIT

WHERE LAST_NAME ="Smith"

<h3>What is SQL?</h3>

This is an acronym that means Structured Query Language that is used in handling data in a database.

Hence, we can see that from the attached image, there is a table that contains the details of customers and their various data such as their first and last names, credit limits, address, etc, and the  GET_CREDIT_LIMIT procedure is shown above.

Read more about SQL here:

brainly.com/question/25694408

#SPJ1

3 0
2 years ago
What is the effect of this line of CSS code?
Semenov [28]
The correct answer is C
6 0
3 years ago
If you have columns that are truncating your content (not showing all the content), but you cannot increase the width of the wor
mezya [45]

Answer:

Use the Wrap text button

Explanation:

A wrapped cell allows users to insert text into cells in Excel without truncating the contents of the cell. This makes the data in this cell very easy to read.

Follow these steps to wrap your text:

  1. Click on the cell that you want to format
  2. On the Home tab, click the wrap text button
  3. Do all for all the cells affected.

The wrap text function will help to make the text visible without losing data.

4 0
3 years ago
Which type of data is presented on the y-axis?
den301095 [7]
For example, if I was foong a bar graph about the amounts of what was in different jars, the x-axis would have the items in the jars, and the y-axis woukd have the amount of items in the jars
6 0
3 years ago
Read 2 more answers
State and explain five misused of science and technology​
Nonamiya [84]

Answer:

1. Perpetration of violence

2. Breach of privacies

3. Replacement of human labor

4. National threats

5. Devotion of excessive time to technologies

Explanation:

The advent of science and technology have come with lots of benefits to man. Some of these benefits include, the invention of phones, electricity, the internet and social media, satellites, drones, etc. However, science and technology have been misused in the following ways;

1. Perpetration of violence: Weapons of war have caused the mass destruction of more people than was obtainable before. To aid these activities the fast means of communication and transportation cause seamless operations.

2. Breach of privacies: People with technical knowledge have the ability to intrude into the privacies of others. They can obtain information that was not originally meant for them.

3. Replacement of human labor: Machines and equipment have reduced the number of humans that were gainfully employed prior to the advent of these technologies.

4. National threats: Nations and governments now threaten their counterparts with the deployment of missiles. These attitudes aid international conflicts.

5. Devotion of excessive time to technologies: Teenagers most especially have developed an overdependence on technologies. A lot of time is now spent on phones, thus causing the neglect of social relationships.

5 0
3 years ago
Other questions:
  • How do you think computers have helped to improve documentation, support and services within the healthcare industry.
    7·1 answer
  • The computer component that makes sure that instructions are decoded and executed properly is the ___________.
    11·2 answers
  • The official record of a high school student's performance is called:
    6·1 answer
  • Help me plase will give brainliest
    12·2 answers
  • "What is the capital of Belarus?" is an example of what type of search query
    10·2 answers
  • I need help with question 3 I’ll give brainliest
    10·2 answers
  • In terms of CPU scheduling metrics, __________ is the time at which the job completes minus the time at which the job arrived in
    10·1 answer
  • Technological advances have made cyberbullying
    5·1 answer
  • PLZ HELP What will be the output? class num: def init (self.a): self. number = a mul* __(self. b) return self. number + b. numbe
    7·1 answer
  • The coordinates for the section element need not be defined as long as its position is set to
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!