#include <stdio.h>

//*******************
//Description: This is a temperature conversion program between
// celsius and fahrenheit 
#include <stdio.h>

// function prototypes
float toCelsius    (int theFahrenheitTemp);
float toFahrenheit (int theCelsiusTemp); 

int main ()
{
   int i;  // loop index

   printf("Celsius	Fahrenheit\n");
   printf("-------	----------\n");
   for (i = 0; i <= 100; i++)
{


// call and print results from each of the functions
   printf("%4d	%7.1f\n", i, toFahrenheit(i));

}   // end loop 1
       
   
    printf("\n");

   printf("Fahrenheit	Celsius\n");
   printf("----------	-------\n");
   for(i = 32; i <= 212; i++)
{

// call and print results from each of the functions
   printf("%4d	%7.2f\n", i, toCelsius(i));

} // end loop 2



   // create some loop to print Fahrenheit to Celsius

      // call and print results from each of the functions

}


//*********************
//Function: toCelsius
//Purpose: converts fahrenheit to celsius
//Return: gives you the equivalent in celsius
//********************

float toCelsius (int theFahrenheitTemp)
{
	return (theFahrenheitTemp - 32) * 5.0f / 9.0f;

}

//*******************
//function: toFahrenheit
//Purpose: converts celsius to fahrenheit
//Return: gives you the equivalent temperature in fahrenheit
//*******************

float toFahrenheit (int theCelsiusTemp)
{

	return theCelsiusTemp * 9.0f / 5.0f + 32.0f;
}


