/* This program converts a temperature to Fahrenheit and/or Celsius,
   using class Temperature.

   Input:  An arbitrary Temperature
   Output: The Fahrenheit and Celsius equivalents of that Temperature
---------------------------------------------------------------------*/

#include <iostream.h>

#include "Temperature.h"

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

   char
      Response;
   Temperature
      TempVar;                                   // construction

   do
   {
      cout << "\nPlease enter a temperature\n"
           << "(degrees, followed by F or C): ";

      cin >> TempVar;

      cout << "\n\t" << TempVar.Fahrenheit()
           << " is equivalent to "
           << TempVar.Celsius() << endl;

      cout << "\nMore temperatures (y or n)? ";
      cin >> Response;
   }
   while ((Response == 'y') || (Response == 'Y'));

   return 0;
}

