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
dalvyx [7]
4 years ago
11

Write a program the will convert Celsius to Fahrenheit or the other way.The user is asked to enter a floating point number.The u

ser should be asked to select the conversation that will be performed.The menu should look like the following:
C-----From Celsius to Fahrenheit
F-----From Fahrenheit to Celsius
Computers and Technology
1 answer:
meriva4 years ago
8 0

Answer:

<u>Output</u>

Temperature Converter

C-----From Celsius to Fahrenheit

F-----From Fahrenheit to Celsius

Enter your choice (C or F):  

C

Enter temperature in Celsius:  

45

Temperature in Fahrenheit: 113.0 °F

Explanation:

Below given is a java code that will convert Celsius to Fahrenheit or the other way:-

import java.util.Scanner;

public class TemperatureConvertor {

public static void main(String[] args){

 double celsius=0.0;

 double fahrenheit=0.0;

 String choice;

 Scanner input=new Scanner(System.in);

 System.out.println("Temperature Convertor");

 System.out.println("C-----From Celsius to Fahrenheit");

 System.out.println("F-----From Fahrenheit to Celsius");

 System.out.println("Enter your choice (C or F): ");

 choice=input.next();

 if(choice.equals("C")){

  System.out.println("Enter temperature in Celsius: ");

  celsius=input.nextDouble();

  fahrenheit=((9*celsius)/5)+32;

  System.out.println("Temperature in Fahrenheit: "+fahrenheit+" °F");

 }else if(choice.equals("F")){

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

  fahrenheit=input.nextDouble();

  celsius=(5*(fahrenheit-32))/9;

  System.out.println("Temperature in Celcius: "+celsius+" °C");

 }else{

  System.out.println("Wrong choice !!!");

 }

 

}

}

You might be interested in
Which of the following is an example of an output device on a smartphone?
Andru [333]

Answer:

The speaker

Explanation:

Speakers are output devices because the audio is taken from the app or website and playing it towards the speakers.

7 0
3 years ago
A man receives a fraudulent email from his bank asking him to confirm his user name and password by going to a particular websit
bonufazy [111]

Answer: The man's info has been found and a hacker was trying to make him confirm his passwrd so he can get a hold of it to hack the man further.

Explanation:

3 0
3 years ago
The following numbers are sorted in which way: 10, 20, 30, 40? A. ascending B. descending C. shuffled
Leya [2.2K]
The answer is ascending because ascending is the numbers from smallest to largets
5 0
4 years ago
Read 2 more answers
Which tool allows users to share code and also serves as a social networking
nikklg [1K]

Answer:

D. GitHub

Explanation:

A P E X

8 0
3 years ago
Surrendering to digital distractions can result in a disappointed
Alja [10]

Answer:

I would say true

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • On an Android device, where can a user find the correct app to use to sync contacts and apps among devices?
    10·1 answer
  • Before installing any software, it's always important to back up your system and to create a BLANK, which enables you to go back
    6·2 answers
  • Write a SELECT statement that selects all of the columns for the catalog view that returns information about foreign keys. How m
    6·1 answer
  • Which step is first in changing the proofing language of an entire document?
    11·1 answer
  • Identify a true statement of a JavaScript program in a web form.
    15·1 answer
  • As a digital investigator for your local sheriff’s department, you have been asked to go with a detective to a local school that
    13·1 answer
  • Step into my world
    7·2 answers
  • 3. Comparing the Utopian and dystopian views of Technology according to Street (1992) which one in your view is more applicable
    9·1 answer
  • Adrian wants to run a digital movie clip that his friend shared with him through email. His system has 2 GB of RAM and 20 GB of
    9·1 answer
  • Marissa is designing a web page that features lessons on how to build cabinets. how can she make the page most engaging for the
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!