/* 	Example 2 - Write a program that converts feet to inches.  Prompt the	*
 *	user for feet and display the equivalent number of inches.  Have your  	*
 *	program repeat this process until the user enters 0 for the number of 	*
 *	feet.									*/

#include <iostream.h>

void prompt(); 			// function declarations
float conversion(float); 


int main() 
{
	float feet, inches;

	cout << "This program will convert feet to inches.\n\n";

	bool isZero == false;

	while (! isZero)
	{
		prompt();	// making a call to the "prompt()" function
		cin >> feet;
		if (feet == 0)	// this way the function is not called unless input is non-zero
		{
			isZero = true;
			cout << "You have chosen to quit the program.\n";	// a message to the user
		}
		else
		{
			inches = conversion(feet);	// making a call to the "conversion(float)" function
			cout << feet << " feet = " << inches << " inches\n\n";
		}
	} // end while loop
} // end main	

void prompt()
{
	cout << "Please enter a value representing feet: ";
}

float conversion(float feet)
{
	return (feet * 12);
}
