/*	Program: functions_in_lib.cpp
	John Howell		ext. 1670			Drawer 76
	Purpose:  show simple use of functions; show the need for "libraries"	
*/

#include <iostream.h>
#include <math.h>		// contains ceil, floor, sqrt and pow
#include <stdlib.h>		// contains abs and labs

int main ( )
{
	double entry, roundup, exponent;
	
	cout << "Enter a real number, and I'll round it for you: ";
	cin  >> entry;
	
	roundup = ceil (entry);

	cout  << "If I round it up, its value is " << roundup << endl;
	
	cout  << "If I round it down, it's " << floor (entry) << endl;
	
	cout  << "The square root of your entry is "<< sqrt(entry)<<endl;
	
	cout << "Enter another number, and I'll raise it to a power: ";
	cin >> entry;
	cout << "What power do you wnat it raised to? ";
	cin  >> exponent;
	cout << entry<< " to the power "<<exponent<<" is "<<pow(entry, exponent)<<endl;
	return 0;
}

