/* lab01a.c  Sample program to calculate celsius temperature  */
/* P. Conrad 09/08/2005 (note: substitute your own name and date  */
/*                        in your celsius to farenheit program) */

/* the following line sets up standard input/output handling */

#include <stdio.h>

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

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

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

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

  // prompt for and read input
  printf("Please enter a farenheit temperature: ");
  scanf("%lf",&tempSuppliedByUser);

  // output result, and end program

  printf("Celsius equivalent: %8.2lf\n", 
	 farenToCelsius (tempSuppliedByUser));

  return 0; // ends the main program

}




