19 March, 2012

C++ Program For Conversion Of Celsius To Fahrenheit.

This Post Contains A C++ Program For Conversion Of Celsius To Fahrenheit With Correct Source Code & Output. This Program Is Written, Compiled & Executed At TurboC3.0 Compiler & Will Help You To Understand The Concept Of 'Arithematic Manipulations' 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 Celsius To Fahrenheit.

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

/* Start Of Main Program */
void main()
{
  
   /* Declaration Of Variables */
   float c, f;

   clrscr();

   /* Asking For The Input From User */
   cout << " Enter Temp. In Celsius : ";
   cin >> c;

   f  =  (  c  +  32  )  *  9.0  /  5.0;

   /* Printing The Output Onto The Screen/Console */
   cout << " \nTemp. In Fahrenheit : " << f;

   getch();
}
/* End Of Main Program */


Output :

Enter Temp. In Celsius : 37 C
Temp. In Fahrenheit : 98.6 F

# Click : Here To View 'C++ Program For Conversion Of Fahrenheit To Celsius' Program.




No comments:

Post a Comment

Subscribe To:

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