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
uranmaximum [27]
2 years ago
15

In this lab, you will implement a temperature converter in JavaScript. The user may type a temperature in either the Celsius or

Fahrenheit textbox and press Convert to convert the temperature. An image displays based on the converted temperature. (see the image uploaded here)

Computers and Technology
1 answer:
jek_recluse [69]2 years ago
5 0

Use the knowledge in computational language in JAVA to write a code that convert the temperature.

<h3>How do I convert Celsius to Fahrenheit in Java?</h3>

So in an easier way we have that the code is:

  • Fahrenheit to celsius:

<em>/* When the input field receives input, convert the value from fahrenheit to celsius */</em>

<em>function temperatureConverter(valNum) {</em>

<em>  valNum = parseFloat(valNum);</em>

<em>  document.getElementById("outputCelsius").innerHTML = (valNum-32) / 1.8;</em>

<em>}</em>

  • Celsius to Fahrenheit:

<em>function cToF(celsius) </em>

<em>{</em>

<em>  var cTemp = celsius;</em>

<em>  var cToFahr = cTemp * 9 / 5 + 32;</em>

<em>  var message = cTemp+'\xB0C is ' + cToFahr + ' \xB0F.';</em>

<em>    console.log(message);</em>

<em>}</em>

<em>function fToC(fahrenheit) </em>

<em>{</em>

<em>  var fTemp = fahrenheit;</em>

<em>  var fToCel = (fTemp - 32) * 5 / 9;</em>

<em>  var message = fTemp+'\xB0F is ' + fToCel + '\xB0C.';</em>

<em>    console.log(message);</em>

<em>} </em>

<em>cToF(60);</em>

<em>fToC(45);</em>

See more about JAVA at brainly.com/question/12975450

You might be interested in
Write a program that ask a user to input radius of a circle and display circumference of a circle
uranmaximum [27]

Answer:

Explanation:

8

4 0
3 years ago
What's the main idea??
tatyana61 [14]
My computer wont let me download this pdf

7 0
3 years ago
All the concrete classes in the java collections framework implement _____________. the cloneable interface the comparable inter
liubo4ka [24]
Since java.util.PriorityQueue doesn't use the Cloneable interface, I think it's safe to say that Serializable interfaces are implemented in all instances.
8 0
3 years ago
Will give brainliest to whoever can answer all of these questions correctly.
babymother [125]

false

ppt

chips designed to preform a function

Apologize to the customer for the inconvenience and offer to refund his money or replace the item

OneDrive-CollegeWork-FreshmanYear-NameOfClass

true

Social networking

paragraph

true

complete fill

true


 

7 0
4 years ago
Read 2 more answers
Question 2 (1 point)
amm1812

Answer:

The software that supports a computer's basic functions, such as scheduling tasks, executing applications, and controlling peripherals.

The answer would be True

Explanation:

4 0
3 years ago
Other questions:
  • What does CMOS stand for?
    15·2 answers
  • Ella has finished drafting her presentation. What should she do next?
    6·2 answers
  • Considering the traffic problem, do you think Rod handled the situation well?
    15·1 answer
  • Use fuel with the _____________ rating recommended by your vehicle manufacturer. A ) Converter B) Emission C) Exhaust D) Octane
    9·2 answers
  • How to write a program in java that finds the max number of an array of integers?
    6·1 answer
  • Answer the following questions based on your readings from Module 1. Describe a time when you or someone you observed showed a p
    9·1 answer
  • In a sport like baseball, which of the following could be considered a “rule”?
    12·1 answer
  • Write a function writel that will write the length of a side of a square. If only one argument is passed to the function, it is
    10·1 answer
  • What is a valid response when identity theft occurs
    10·1 answer
  • What is software??????​??????????????????
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!