Answer to Question #265178 in C++ for ursula

Question #265178

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-21T04:55:09-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: " << TempK << '\n';

  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