on this instructional exercises we will find out what temperature is about and how to Write a program which acknowledge temperature in Fahrenheit and print it in centigrade.using c++ programming dialect
what is Temperature?
Temperature is a target estimation of how hot or frosty a question is. It can be measured with a thermometer or a calorimeter. It is a methods for deciding the inner vitality contained inside the framework.HEAT VERSUS TEMPERATURE
Note that temperature is not the same as warmth, however the two ideas are connected. Temperature is a measure of the inside vitality of the framework, while warm is a measure of how vitality is exchanged starting with one framework (or body) then onto the next. This is generally depicted by the active hypothesis, in any event for gasses and liquids. The more noteworthy the warmth consumed by a material, the all the more quickly the particles inside the material start to move, and in this manner the more noteworthy the ascent in temperature. Things get somewhat more convoluted for solids, obviously, however that is the essential thought.TEMPERATURE SCALES
A few temperature scales exist. In America, the Fahrenheit temperature is most ordinarily utilized, however the SI unit Centigrade (or Celsius) is utilized as a part of the vast majority of whatever remains of the world.
The Kelvin scale is utilized frequently in material science, and is balanced with the goal that 0 degrees Kelvin is total zero, in principle, the coldest conceivable temperature, in which all active movement stops.
HOW TO CALCULATE TEMPERATURE from FAHRENHEIT TO CELSIUS CONVERSION FORMULA
To convert temperatures in degrees Fahrenheit to Celsius, subtract 32 and multiply by .5556 (or 5/9).
Example: (50°F - 32) x .5556 = 10°C
HOW TO CALCULATE TEMPERATURE FROM CELSIUS TO FAHRENHEIT CONVERSION FORMULA
To convert temperatures in degrees Celsius to Fahrenheit, multiply by 1.8 (or 9/5) and add 32.
Example: 30°C x 1.8 + 32 = 86°F
//a c++ program to perform celsius to fahrenheit conversion #include<iostream> using namespace std; int main() { float fahrenheit, celsius; cout << "Enter the temperature in Celsius : "; cin >> celsius; fahrenheit = (celsius * 9.0) / 5.0 + 32; cout << "The temperature in Celsius : " << celsius << endl; cout << "The temperature in Fahrenheit : " << fahrenheit << endl; return 0; }
0 comments:
Post a Comment