Write a program that converts degrees Celsius (TC) to degrees Rankin (TR). Recal
ID: 3668576 • Letter: W
Question
Write a program that converts degrees Celsius (TC) to degrees Rankin (TR). Recall TF = TR-459-67. And TF=(9/5)TC+32 Output the Fahrenheit and Rankin equivalent to the input Celsius temperature Write a program that converts degrees Kelvin(TK) to degrees Fahrenheit(TF). And you also know that degrees Rankin(TR) is related to TK by TR=(9/5)TK and you Recall TF = TR-459.67. Output the Fahrenheit and Rankin equivalent to the input Kelvin temperature. Write a program that converts degrees Fahrenheit (TF) to degrees Celsius (TC). Recall degree Rankin(TR) is TR= TF+459.6 and TC=(5/9)(TF-32) Output the Celsius and Rankin equivalent to the input Fahrenheit temperature.Explanation / Answer
First of all for direct conversion from Celsius to Rankine the formula is:
R = (C + 273.15) × 1.8
and from Rankine to Celsius
C = ((R 491.67) × 5)/9
Ok.About the code..
#include <iostream>
using namespace std;
int main()
{
double C1, R1;
cout << "Temperature in Celsius" << endl;
cin >> C1;
cout << "Celsius to Rankin" << endl;
R1 = (C1 + 273.15)*1.8;
cout << "Temperature Fahrenheit is" << endl;
cout << R1 << "deg Rankin" << endl;
return 0;
}
2.
3.
#include<stdio.h>
#include<conio.h>
int main()
{
float tf,tc,tr;
printf("Enter temperature value in Fahrenheit: ");
scanf("%f", &tf);
tc = (tf - 32) / 1.8;
tr= tf+459.60
printf("Converted Celsius and rankine value: %f%f",tc,tr);
getch();
return 0;
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.