// lab08b.cc Sample program to convert farenheit to celsius
// P. Conrad 9/30/2005 (note: substitute your own name and date in your
//                     celsius to farenheit program)

// the following two lines allow stream input and output

#include <iostream>

// ************ user defined functions ***********

double farenToCelsius(double fTemp)
{
   return ((fTemp - 32) / 9.0 * 5.0);
}

// ************ main program  ************

int main(void)
{
   // declare a variable for farenheit temp
   double tempSuppliedByUser;

   // prompt for and read input
   std::cout << "Please enter a farenheit temperature: " << std::flush;
   std::cin >> tempSuppliedByUser;

   // output result, and end program

   std::cout << "Celsius equivalent: " << farenToCelsius (tempSuppliedByUser);
   std::cout << std::endl;
   return 0; // ends the main program

}

