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
Recall that with the CSMA/CD protocol, the adapter waits K. 512 bit times after a collision, where K is drawn randomly. a. For f
julia-pushkina [17]

Complete Question:

Recall that with the CSMA/CD protocol, the adapter waits K. 512 bit times after a collision, where K is drawn randomly. a. For first collision, if K=100, how long does the adapter wait until sensing the channel again for a 1 Mbps broadcast channel? For a 10 Mbps broadcast channel?

Answer:

a) 51.2 msec.  b) 5.12 msec

Explanation:

If K=100, the time that the adapter must wait until sensing a channel after detecting a first collision, is given by the following expression:

  • Tw = K*512* bit time

The bit time, is just the inverse of the channel bandwidh, expressed in bits per second, so for the two instances posed by the question, we have:

a) BW  = 1 Mbps = 10⁶ bps

⇒ Tw = 100*512*(1/10⁶) bps = 51.2*10⁻³ sec. = 51.2 msec

b) BW = 10 Mbps = 10⁷ bps

⇒ Tw = 100*512*(1/10⁷) bps = 5.12*10⁻³ sec. = 5.12 msec

5 0
3 years ago
Linda is the education manager for a national coding service company. Once a month she holds a videoconference with all her codi
Andru [333]

Answer:

Option (D) i.e., synchronous is the correct option to the following question.

Explanation:

The following statement are the synchronous type of training because it is the type of training which is given to students or the persons for the purpose of knowledge in present time and the trainer or that person who give them information they can receive feedback and message at that time and all persons has permission to ask questions with them.

Option C is incorrect because in this type of training the interaction between the trainer and the receiver could not be established.

Option A is incorrect because the classroom-based training only for that person or the students who are available at that time at that place and in this video conferencing is not available.

8 0
3 years ago
2.17.5 coders answers
BlackZzzverrR [31]

Answer:

start();

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

}

}

function start(){

}

Q. 5.1.3: Move to Wall

Ans:

function start(){

while(frontIsClear()){

move();

}

}

I apologize if its incorrect

5 0
1 year ago
State the function of a URL in a website​
mihalych1998 [28]

Answer:

It's purpose is to access a webpage.

Explanation:

A URL contains detailed information on the webpage such as, the domain name, protocol, and path. This information directs the browser to the desired page.

3 0
3 years ago
A leading pharmaceutical company is launching a major transformation of its entire Cloud operations in order to more quickly and
klasskru [66]

This is a great move for the Pharmaceutical company for a number of reasons.

  • The first and perhaps most important advantage is to the company is that costs relating to Information and Technology (IT) Infrastructure will be reduced to the barest minimum. As a start-up, it is important to keep costs as low as possible. Costs are kept low because the organization will not need to pay the added energy and personnel-related costs of maintaining an elaborate IT infrastructure.

  • The advantage of scalability. Scalability in this sense simply means the ability to take on additional workload or adjust to market demand. As the company grows and attracts more clients, it would need to expand beyond the capacity that it had at the onset. Opting for Cloud as a Service (CaaS) gives them this advantage.

  • Another way CaaS can help the client is that they enjoy the advantage of Business Continuity. Business Continuity is the ability to remain in business regardless of disruptions to the business itself at one location. This is because CaaS providers are structured in such a way that they are able to keep their subscribers in operation regardless of any disasters.

Other advantages to this client are:

  1. Ease and access of automatic updates to the system;
  2. Ease of collaboration between internal and external users of the same system.

Learn more about the merits of Cloud as a Service here:

brainly.com/question/24705780

4 0
2 years ago
Other questions:
  • You browsing internet and you realize that its not responding what do you do with out rebooting the computer
    10·1 answer
  • Clive wants to write a query that will display the names of the students who scored less than 10 in their final exams. Which num
    8·2 answers
  • The breastbone or ________________ extends down the chest.
    5·1 answer
  • You're a ticket agent for a commercial airline and responsible for checking the identification for each passenger before issuing
    13·1 answer
  • Size of the information in each field of the database
    12·1 answer
  • Many Web browsers allow users to open anonymous windows. During a browsing session in an anonymous window, the browser does not
    8·1 answer
  • Special computers, called __________, keep databases of IP addresses and their corresponding names
    11·1 answer
  • How did the internet originate??​
    12·1 answer
  • In Scratch, you have to choose backdrops from a limited number in the Scratch image library.
    15·1 answer
  • What is added to brining liquid to add flavour​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!