Answer to Question #265693 in C++ for Tsireletso

Question #265693

The formula below decribes how to convert a temperature on the Fahrenheit scale to a temperature on the Kelvin scale.

TempK = (TempF − 32) × 5/9 + 273.15

Using the variables below Write one line of code to implement the formula


// Kelvin temperature

float TempK;

// Fahrenheit temperature

float TempF = 72; 


//One line of code to calculate temperature in Kelvin


---------------------------------------------------------------------------


1
Expert's answer
2021-11-13T23:53:16-0500
#include <iostream>


using namespace std;


int main()
{
    // Kelvin temperature


     float TempK;


// Fahrenheit temperature


    float TempF = 72; 
    TempK = (TempF- 32) * (5/9 + 273.15);
    cout<<"Temperature in Kelvin is: "<<TempK;


    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS