/********************************************************************************\
 *										*
 *	Author:		Jeff Baron						*
 *										*
 *	Date:		09/10/02						*
 *										*
 *	Purpose:	Write a program that converts Celcius to Fahrenheit	* 
 *										*
\********************************************************************************/

#include <iostream>

using namespace std;

double getCelcius();
double convertCel2Fah(double &theCelcius);
void printTemp(double &theTemp);

void main(){

	double theCel;
	double theFah;

	theCel = getCelcius();
	theFah = convertCel2Fah(theCel);
	printTemp(theFah);

}

/******************************** getCelcius ************************************\

	Description:	Gets user input for the celcius temperature

	Parameters:	None

	Returns:	celius: the user inputed celsius temp, made it double
			so they can enter any decimal value to their hearts 
			content

\********************************************************************************/
double getCelcius(){
	double celcius;

	cout << "Please enter a celsius temperature: " << endl;
	cin >> celcius;

	return (celcius);
}

/****************************** convertCel2Fah **********************************\

	Description:	Converts a celcius temperature to fahrenheit

	Parameters:	theCelcius: the celcius temperature we are converting

	Returns:	theFahrenheit: the temperature in fahrenheit

\********************************************************************************/
double convertCel2Fah(double &theCelcius){
	double theFahrenheit;

	theFahrenheit = (9.0/5.0) * theCelcius + 32;

	return (theFahrenheit);

}

/******************************** printTemp *************************************\

	Description:	Prints out a temperature

	Parameters:	theTemp: Whatever temperature in degrees
			unit: The unit type, used for printing

	Returns:	Nothing

\********************************************************************************/
inline void printTemp(double &theTemp){
	cout << "Your temperature is " << theTemp << " degrees fahrenheit" << endl;
}

