You are tasked with converting the temperature from Kelvin to Celsius. The equation for the conversion: T(C) = T(K) - 273.15 Define the variables T1, T2 and T3 that have the values of temperature in Kelvin : 340, 310, 400. Save the converted values in new variables TC1, TC2 and TC3.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter8: Advanced Data Handling Concepts
Section: Chapter Questions
Problem 4RQ
icon
Related questions
Question
100%
You are tasked with converting the temperature from Kelvin to Celsius.
The equation for the conversion:
T(C) = T(K) - 273.15
Define the variables T1, T2 and T3 that have the values of temperature in Kelvin : 340, 310, 400.
Save the converted values in new variables TC1, TC2 and TC3.
Script e
1
%Step 1 -
Define the variables T1, T2 and T3
2
3
4
5
6 %Step 2
Calculate the new variables TC1, TC2 and TC3
7
8
9.
Transcribed Image Text:You are tasked with converting the temperature from Kelvin to Celsius. The equation for the conversion: T(C) = T(K) - 273.15 Define the variables T1, T2 and T3 that have the values of temperature in Kelvin : 340, 310, 400. Save the converted values in new variables TC1, TC2 and TC3. Script e 1 %Step 1 - Define the variables T1, T2 and T3 2 3 4 5 6 %Step 2 Calculate the new variables TC1, TC2 and TC3 7 8 9.
Expert Solution
Step 1

 

#include <iostream>  
using namespace std;  
int main()  
{  
  float T1 =340, T2=310, T3=400;
  float TC1, TC2, TC3;
  
  TC1= T1 -273.15;
  TC2= T2 -273.15;
  TC3= T3 -273.15;
  
  cout<< "value of TC1"<< TC1 <<endl;
  cout<< "value of TC2"<< TC2<<endl;
  cout<< "value of TC3"<< TC3<<endl;
  
}

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage