Question

In Javascript: While loop: use a while loop to calculate and display the Kelvin temperature values...

In Javascript:

While loop: use a while loop to calculate and display the Kelvin temperature values for each Fahrenheit temperature value range from 0 to 100 in increment of 10. use the formula tk = (tf -32) x 5/9 + 273.15   

The values should be displayed exactly as shown:

-17, -12, -6, -1, 4, 10, 15, 21, 26, 32, 37

0 0
Add a comment Improve this question Transcribed image text
Answer #1
var tf = 0, tk;
var result = "";
while (tf <= 100) {
    tk = (tf -32) * 5/9 + 273.15;
    result += parseInt(tk);
    if (tf !== 100) {
        result += ", ";
    }
    tf += 10;
}
console.log(result);

Add a comment
Know the answer?
Add Answer to:
In Javascript: While loop: use a while loop to calculate and display the Kelvin temperature values...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Temperature Converter Create a temperature conversion program that will convert the following to Fahrenheit: Celsius Kelvin...

    Temperature Converter Create a temperature conversion program that will convert the following to Fahrenheit: Celsius Kelvin Newton Your program should take a character which represents the temperature to convert from and a value to be converted to using the following specification: C - Celsius K - Kelvin N - Newton In addition your program should take in the following character to exit the program: X - eXit the program The numeric input for your program should be of type double....

  • General overview This program will convert a set of temperatures from Fahrenheit to Celsius and Kelvin....

    General overview This program will convert a set of temperatures from Fahrenheit to Celsius and Kelvin. Your program will be reading in three double values. The first values are starting and ending temperatures. The third value is the increment value. There is no prompt for the input. There is an error message that can be displayed. This is discussed later. You need to display output for all of the values between the starting and ending values. First two values are...

  • Question 2 Write a program to generate a table of conversions from Fahrenheit to Celsius for...

    Question 2 Write a program to generate a table of conversions from Fahrenheit to Celsius for values from 0 degrees F to 100 degrees F. Print a line in the table for each 5-degree change. Use a while loop in your solution. 1) re,-(TCF)-32) x 5/9 Write a program to generate a table of conversions from Fahrenheit to Kelvin for values from 0 degrees F to 200 degrees F. Allow the user to enter the increment in degrees Fahrenheit between...

  • This program will take the user's input as a temperature in degrees Fahrenheit. The user will...

    This program will take the user's input as a temperature in degrees Fahrenheit. The user will then click a radio button indicating whether a table of temperatures, starting with the entered value, will be displayed in increments of 5 degrees F or 10 degrees F. When a submit button is clicked your code will display a HTML table of temperature values. The first column will be temperatures in degrees Fahrenheit, given in increments of 5 or 10 degrees F, depending...

  • Need help with develop Visual C# Exercise 4-3 form to display the Fahrenheit temperature and corresponding...

    Need help with develop Visual C# Exercise 4-3 form to display the Fahrenheit temperature and corresponding Celsius temperature for Fahrenheit temperatures ranging from -40 to +40 degrees, at increments of 10. Use a for loop. The conversion formula is Celsius (Fahrenheit - 32) * 5/9. I ran the following but nothing is displaying in my listbox. I am not familiar with Form1_load, see below. I am not sure how to create in my form. Help please private void Form1_Load_Click(object sender,...

  • this is MatLab question Exercise Create a table that illustrates the relationship between temperature in degrees...

    this is MatLab question Exercise Create a table that illustrates the relationship between temperature in degrees Celsius and the corresponding temperature in degrees Fahrenheit, from -40 to 100 degrees C in increments of 5 degrees. The conversion formula is as follows: °F=2°C+32 Store the both set of values in vectors while using a for loop. Use variable names TinC and TinF Check the temperatures that we all may know the conversion, e.g., 0 C = 32 F and 100 C...

  • C++ requirements All values must be read in as type double and all calculations need to...

    C++ requirements All values must be read in as type double and all calculations need to be done using type double. For part 2 you MUST have at least 4 functions, including main. The main function will be the driver of the program. It needs to either do the processing or delegate the work to other functions. Failure to follow the C++ requirements could reduce the points received from passing the tests. General overview This program will convert a set...

  • Programming problem: Input Fahrenheit temperatures, storing them in an array, then display a table of those...

    Programming problem: Input Fahrenheit temperatures, storing them in an array, then display a table of those temperatures along with their Celsius equivalents. Do this as a modification of A06 if you wish, but 1. One temperature at a time, prompt for and input a record of 10 daily temperatures in Fahrenheit. 2. After that record has been input, use a second counting loop to display a table of data in which: at minimum: Use a counting loop. Store these values...

  • Python Testing a) The temperature readings are correctly handled using a while loop and the output...

    Python Testing a) The temperature readings are correctly handled using a while loop and the output is correct b) The wind speed readings are correctly handled using a while loop and the output is correct c) The humidity readings are correctly handled using a while loop and the output is correct d) Works correctly overall The program first prompts for and reads in temperatures (all integers), until a line with no characters in received. It computes the average of all...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT