/*****************************************************************/ // File : fah2cel.c // Purpose : Temperature conversion from Fahrenheit To Celsius // Author : Nanda Kishor K N // Mail Id : knnkishor@yahoo.com, nandakishorkn@rediffmail.com // Website : www.c4swimmers.esmartguy.com ( WEB MASTER ) // Group : c4swimmers@yahoogroups.com ( MODERATOR ) /*****************************************************************/ #include /* Name : main() Purpose : This is the main function that accepts the temperature in Fahrenheit and computes the equivalent Celsius value. This does not call any other function. Parameter : None */ int main() { // Variable Declarations & Initialization // Naming conventions are used like all float variables should begin with 'f' float fCelsius,fFahrenheit; // Accept the Temperature in Fahrenheit degrees printf("Fahrenheit Degrees : "); scanf("%f",&fFahrenheit); // Compute the Celsius value fCelsius = (float)(((5.0 * fFahrenheit) - 160.0) / 9.0); //fFahrenheit = (float)(((9.0 * fCelsius) + 160.0)/5.0); // Display the result or target temperature i.e.Celsius value printf("Celsius Degrees : %f\n",fCelsius); return 0; } // End of main() program