C Program for Temperature Conversion from Celsius to Fahrenheit

C Program for Temperature Conversion from Celsius to Fahrenheit.


C Program for Temperature Conversion from Celsius to Fahrenheit Images-Pictures-Photos-Pics-Wall Papers-Snaps-Basic C Programs-C Language Programs-C Program to Convert Fahrenheit to Celsius-General C Programs-Convert Temperature-C Program to Convert Celsius to Fahrenheit-K&RC Program.


--------------------------------------------------------------------------------------------------------

#include<stdio.h>

int main( )

{
   float fahrenheit, celsius;
   int lower,upper,step;
   lower = 0;
   upper = 200;
   step = 20;
   printf("C\tF");
   printf("\n---------");
   celsius = lower;
   while(celsius <= upper)
   {
       fahrenheit = (9.0/5.0)*celsius+32.0;
       printf("\n%3.0f%6.1f",celsius,fahrenheit);
       celsius = celsius + step;
   }
return 0;
}

--------------------------------------------------------------------------------------------------------------------------

Output

--------------------------------------------------------------------------------------------------------------------------


C             F
0             32.0
20           68.0
40           104.0
60           140.0
80           176.0
100         212.0





EmoticonEmoticon