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

Write a program that converts a temperature in Fahrenheit to temperature in Centigrade. The program will ask the user to enter a

temperature in Fahrenheit as a decimal number. It will then display the same temperature in Centigrade as a decimal number. See Testing section below for test data.
Computers and Technology
1 answer:
krek1111 [17]4 years ago
6 0

Answer:

// here is program in java to convert Fahrenheit to equivalent Centigrade.

// import package

import java.util.*;

// class definition

class Main

{

   // main method of the class

public static void main (String[] args) throws java.lang.Exception

{

   try{

    // object to read value from user

    Scanner scr=new Scanner(System.in);

    // ask to enter temperature in Fahrenheit

       System.out.print("enter rented minutes: ");

       // read temperature in Fahrenheit

       int temp_f=scr.nextInt();

       // convert Fahrenheit to Centigrade

       double cen=(temp_f-32)/1.8;

       // print the temperature

       System.out.println(temp_f+" Fahrenheit is equal to "+cen+" Centigrade");

   }catch(Exception ex){

       return;}

}

}

Explanation:

Read temperature in Fahrenheit from user and assign it to variable "temp_f". To convert the temperature to equivalent Centigrade, first subtract 32 from Fahrenheit and then divide it by 1.8 .This will give equivalent temperature in Centigrade.

Output:

enter rented minutes: 100

100 Fahrenheit is equal to 37.77777777777778 Centigrade

You might be interested in
Write a method isMultiple that determines, for a pair of integers, whether the second integer is a multiple of the first. The me
NNADVOKAT [17]
I don't know what language you want it in but I will write this in Java.

public int isMultiple(int x, int y) {
    if (x % y == 0)
        return 1;
    return 0;
}

The mod function (%) returns 0 iff x divides y.
Feel free to ask me questions!
3 0
4 years ago
Read 2 more answers
Describe two measures you can use to evaluate whether an attachment in a message is reliable to open.
meriva
<span>If a attachment is not reliable to open, terrible effects can happen, peradventure it may have a virus or even malware that can destroy a computers software. 

To avoid this and stay on the safe side, try the following:-

- Open it in protected view 
- Do not save the attachment on your computer 
- Look at the author and read the message carefully to make sure it is not biased. 
- Open it on a flash-drive </span>
8 0
3 years ago
Read 2 more answers
Tristan has moved the Television and related equipment
madreJ [45]

Answer:

1: C

2: B

3: A

Explanation:

6 0
3 years ago
Describe a strategy that you could use to win the recess basketball shooting game HORSE. Analyze your strategy’s risks and rewar
kobusy [5.1K]

Answer:

i mean, theres not much strategy to the game at all, its just being able to shoot from hard spots, and obviously have good consistentsy

Explanation:

5 0
4 years ago
A Turing machine with doubly infinite tape (TMDIT) is similar to an ordinary Turing machine except that its tape is infinite to
umka2103 [35]

Answer and Explanation:

A TM with doubly infinite tape can simulate an ordinary TM. It marks the left-hand end of the input to detect and prevent the head from moving off of that end. To simulate the doubly infinite tape TM by an ordinary TM, we show how to simulate it with a 2-tape TM, which was already shown to be equivalent in power to an ordinary

TM. The first tape of the 2-tape TM is written with the input string, and the second tape is blank. We cut the tape of the doubly infinite tape TM into two parts, at the starting cell of the input string. The portion with the input string and all the blank spaces to its right appears on the first tape of the 2-tape TM. The portion to the left of the input string appears on the second tape, in reverse order.

3 0
3 years ago
Other questions:
  • Kylee needs to ensure that if a particular client sends her an email while she is on vacation, the email is forwarded to a
    10·1 answer
  • Rachel uses a word processor to write short stories. However, most of her time is spent toying with the keys, rather than in wri
    13·2 answers
  • Suppose a program is running on a distributed-memory multiprocessor. There are 1,000 instructions in the program and 80% of inst
    13·1 answer
  • Why are fixed resistors’ values indicated by color bands rather than printing the numeric value on their exterior?
    13·1 answer
  • You have a desktop computer that supports both IEEE 1394 and USB 2.0. You are purchasing some devices that will connect to these
    13·1 answer
  • Most of us have been using elements of Web 2.0 without even realizing it.<br> True<br> False
    6·1 answer
  • Match the file extensions to the file types. Some file types may be used more than once.
    11·1 answer
  • A program to that would accept the length and width of a rectangle and display the results​
    14·1 answer
  • Columns, margins and orientation can all be found on what tab?
    15·1 answer
  • What do the last two steps in the cyclical design process most likely involve
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!