Write a Program to Convert Centigrade Temperatures to Fahrenheit - CodeTextPro | Web Tutorial | Technology

CodeTextPro.com Provides - Web design, Technology gyan, Digital marketing, Online earnings, Seo, Adsense, Technology news, Motivation and inspiration, Latest Technology Affairs, Gadgets, Blogging

Tuesday, January 8, 2019

Write a Program to Convert Centigrade Temperatures to Fahrenheit

Centigrade to Fahrenheit 

INTRODUCTION:
Temperature refers to how hot or cold something is. The same temperature has different readings on the three temperature scales shown below - Fahrenheit, Celsius, and Kelvin. Learn more about the Celsius temperature scale, practice conversion among different scales, and test your knowledge with quiz questions. 

In science, the Celsius scale is used more often than the Fahrenheit scale. The Celsius scale is divided into 100 equal parts, called degrees Celsius (°C), between the freezing point and boiling point of water. This scale was invented by Anders Celsius in 1742. Celsius also based his scale on the freezing and boiling points of water. The freezing point of water on this scale is 0 degrees Celsius (0°C). The boiling point of water is 100 degrees Celsius (100°C). This thermometer scale is sometimes called the centigrade scale because there are 100 Celsius degrees between the two fixed points.
As shown by these thermometers, a given temperature is represented by different numbers on the three temperature scales. For example, the freezing point of water is 32°F, 0°C, or 273 degrees Kelvin. As you can see, 0°C is actually a much higher temperature than 0 K, but a change of 1-degree Kelvin is equal to a change of one Celsius degree. In addition, 0°C is a higher temperature than 0°F, but a change of one Fahrenheit degree is not equal to a change of one Celsius degree. We can convert from one scale to another using these simple equations.



ALGORITHM:

STEP 1: START
STEP 2: Input Temperature in Centigrade in  
                C Variable
STEP 3: Calculate Fahrenheit F = (9*C+160)/5
STEP 4: Show Temperature in Fahrenheit by   
                 F Variable
STEP 5: EXIT



FLOWCHART:






PROGRAMME:



VARIABLES:












OUTPUT CHECKING:






DISCUSSION:

The metric system uses the Celsius scale to measure temperature. However, temperatures are still measured on the Fahrenheit scale in the U.S.
 Water freezes at 0o Celsius and boils at 100o Celsius which is a difference of 100o. Water freezes at 32o Fahrenheit and boils at 212o Fahrenheit which is a difference of 180o. Therefore each degree on the Celsius scale is equal to 180/100 or 9/5 degrees on the Fahrenheit scale.
        How to convert Celsius temperatures to Fahrenheit
        Multiply the Celsius temperature by 9/5.
        Add 32o to adjust for the offset in the Fahrenheit scale.
        Example: convert 37o C to Fahrenheit.
        37 * 9/5 = 333/5 = 66.6
        66.6 + 32 = 98.6o F 
 There is a mental math method to convert from Celsius to Fahrenheit. The ratio of 9/5 is equal to 1.8 and 1.8 is equivalent to 2 - 0.2
       How to convert Celsius temperatures to Fahrenheit with mental math.
        Double the Celsius temperature (multiply by 2).
        Take 1/10 of this number (2 * 1/10 = 0.2) and subtract it from the number above.
        Add 32o to adjust for the offset in the Fahrenheit scale.
        Example: convert 37o C to Fahrenheit.
        37 * 2 = 74
        74 * 1/10 = 7.4
        74 - 7.4 = 66.6

        66.6 + 32 = 98.6o F 

No comments:

Post a Comment