/* This program converts a temperature from Fahrenheit to Celsius,
   using a conversion function named FahrToCelsius().

   Input:  FahrenheitTemp
   Output: CelsiusTemp
--------------------------------------------------------------------*/

#include <iostream.h>

double FahrToCelsius(double);             // function declaration

int main(void)
{
   cout << "\nThis program converts a temperature\n"
        << "\tfrom Fahrenheit to Celsius.\n";

   double
      FahrenheitTemp;

   cout << "\nPlease enter a Fahrenheit temperature: ";
   cin >> FahrenheitTemp;

   double                                 // function call
      CelsiusTemp = FahrToCelsius(FahrenheitTemp);

   cout << "\n\t" << FahrenheitTemp
        << " in Fahrenheit is equivalent to "
        << CelsiusTemp << " in Celsius.\n\n";

   return 0;
}

/*--------------------------------------------------------------------
FahrToCelsius converts a temperature from Fahrenheit to Celsius.

   Receive: A Fahrenheit temperature
   Return:  The equivalent Celsius temperature
---------------------------------------------------------------------*/

double FahrToCelsius(double Temp)         // function definition
{
   return (Temp - 32.0) / 1.8;
}
