Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

C++ Converting Kelvin to Fahrenheit

	float far, kel;

    cout << "Enter the temperature in Kelvin: ";
    cin >> kel;

    far = 1.8 * (kel - 273.15) + 32; //° F = 9/5(K - 273) + 32 
    								//or ° F = 9/5(K - 273.15) + 32

    cout << "The temperature of " << kel << " in Fahrenheit is: " << far;
 
PREVIOUS NEXT
Tagged: #Converting #Kelvin #Fahrenheit
ADD COMMENT
Topic
Name
4+6 =