08 March, 2013

C Program For Conversion Of Fahrenheit To Celsius.

This Post Contains A C Program For Conversion Of Fahrenheit To Celsius With Correct Source Code & Output. This Program Is Written, Compiled & Executed At TurboC/C++3.0 Compiler & Will Help You To Understand The Concept Of 'Conversion' From C Language. It Is A Well-Structured Program With Proper Comments Which Provides Step-By-Step Description Of Various Features Of The Language In A Simple & Easy-To-Understand Way.


 # Note : You Can Simply Copy-Paste The Following Program Or Code Into Compiler For Direct Result.


C Program For Conversion Of Fahrenheit To Celsius.

/* Declaration Of Header Files */
# include < stdio.h >
# include < conio.h >

/* Start Of Main Program */
void main()
{
 
   /* Declaration Of Variables */
   float cel, fah;
   clrscr();

   /* Asking For The Input From User */
   printf ( " \n Enter Temp. In Fahrenheit : " );
   scanf ( " %f ", &fah );

   cel  =  (  fah  -  32  )  *  5.0  /  9.0;

   printf ( " \n Temp. In Celsuis :  %f  ",  cel );
   getch();
}
/* End Of Main Program */ 

Output :

Enter Temp. In Fahrenheit : 110 F
Temp. In Celsius : 43.333332 C



No comments:

Post a Comment

Subscribe To:

Most Commonly Asked Programs In 'C' & 'C++' Language.