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
allochka39001 [22]
3 years ago
13

Write a program that allows the user to convert a temperature given in degrees from either Celsius to Fahrenheit or Fahrenheit t

o Celsius. Use the following formulas: Degrees_C = 5(Degrees_F− 32)/9 and Degrees_F = (9(Degrees_C)/5) + 32) Prompt the user to enter a temperature and either a C or c for Celsius or an F or f for Fahrenheit. Convert the temperature to Fahrenheit if Celsius is entered, or to Celsius if Fahrenheit is entered. Display the result in a readable format. If anything other than C, c, F, or f is entered, print an error message and stop.
Computers and Technology
1 answer:
lutik1710 [3]3 years ago
7 0

Answer:

import java.util.Scanner;

public class num6 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter the temperature");

       double temp = in.nextDouble();

       System.out.println("Enter C to convert to celsius or F for fahrenheit");

       String con = in.next();

       if (con.equalsIgnoreCase("C")) {

           double Degrees_C = 5 * (temp - 32) / 9;

           System.out.println("The temperature of " + temp + "F in Celcius is" +

                   " " + Degrees_C);

       } else if (con.equalsIgnoreCase("F")) {

           //Degrees_F = (9(Degrees_C)/5) + 32)

           double Degrees_F = (9 * (temp) / 5) + 32;

           System.out.println("The temperature of " + temp + " celcius in Farenheit is" +

                   " " + Degrees_F);

       } else {

           System.out.println("Invalid value for conversion");

       }

   }

}

Explanation:

Use Scanner Class to prompt and receive user input

Use string method equalsIgnoreCase in an if statement to test the conversion to degrees celcius or farenheit

evaluate and output the values based on the equation given in the question

You might be interested in
3. Cellular phone technology works on a system of geographically separated zones
Nataly [62]

Answer:

Cellular phone technology works on a system of geographically separated zones

called

B. Cells

8 0
3 years ago
Which item is used for formatting in responsive web design?
trapecia [35]

Answer:

4. Removing horizontal scroll

Explanation:

Horizontal scroll can be super annoying when you're trying to view someone's web page. It can cut off part of your view and ruin the whole experience. It's best to eliminate horizontal scroll completely wherever you can.

5 0
3 years ago
What feature did we use to quickly apply the formatting shown in this image?
hammer [34]

Answer:

Conditional formatting.

Explanation:

Conditional Formatting is the method that main objective to enabling the users for setting the formatting to the  cell or the cell range as well as it adjust the layout based that are based on the cell value or the formula value.

  • The Conditional formatting making the cell value as bold as in the given question we see that the cell value is bold  when the given condition is true.
  • The objective of pivot table is to summarizing the data it do not provide the formatting that's why this option is incorrect .
  • The objective of what if analysis is altering the absolute value of worksheet also it see how some modifications will influence the result of the worksheet formulae in the spreadsheet it do not provide the formatting that's why this option is incorrect .
  • Data scenario formatting do not provide the formatting that's why this option is incorrect .

3 0
3 years ago
A colleague is complaining about the slowness of a desktop computer, and you explain that the slowness is
mr_godi [17]

Answer:

You are explaining a virtual server

I hope this is correct.

Explanation:

A virtual platform is a software based system that can fully mirror the functionality of the platform, it provides full visibility

A virtual server, on the other hand converts one physical server into multiple virtual machines that can each run their own operating system, it is hosted by a offsite dsta center

6 0
2 years ago
Lets computer know what to do when it starts up...
Paha777 [63]

Answer: the answer would be the "Rom chip"

Explanation:

The rom chip controls all aspects of the computer, this is also known as "BIOS" or "basic input/output system"

5 0
3 years ago
Other questions:
  • To create a formula in ___ you would first click in one of the cells. A.word b.excel c.facebook d.powerpoint
    13·1 answer
  • A company has developed a business-critical system for its core automation process with a software vendor. Which of the followin
    12·1 answer
  • Which column and row references are updated when you copy the formula: =F$5+12? Value 12 Column F Column F and row 5 Row 5
    8·1 answer
  • What command launches the remote desktop client for windows?
    12·1 answer
  • Suppose that Alice wants to send Bob a 50 kilobyte message over a 1 Gbps link. The total time required to transmit the message (
    5·1 answer
  • How can you ensure that your web pages are compliant with a w3c standard?
    9·1 answer
  • Is USA TestPrep a test-taking site that won't let you access other windows without kicking you off?
    13·1 answer
  • Which application is a digital version of a manual typewriter? A. Database B. Presentation C. Spreadsheet D. Word processor
    8·2 answers
  • The User Datagram Protocol (UDP) is called the connectionless protocol because: It does not attempt to fix bad packets but resen
    8·1 answer
  • Abby has received a request for a data set of actual data for testing a new app that is being developed. She does not want the s
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!