// Mr. Minich
// Wyo C++
// Ch. 9 Demo Program #10
// October 29, 2001
// Purpose - to illustrate the use of two functions
#include <iostream.h>
#include "M:\C++ Programming\AP classes\apstring.h"
double totalTaxable(int myCandyBars, double myPricePerBar, double myTaxRate);
void displayName(string incoming);
int main()
{
int candyBars = 5;
double total = 0.0;
const double PRICE_PER_BAR = 0.85;
displayName("Mr. Minich");
total = totalTaxable(candyBars, PRICE_PER_BAR, 1.06);
cout << endl << "The total price including tax is $" << total << endl;
return 0;
}// end of main
double totalTaxable(int myItems, double myPricePerItem, double myTaxRate)
{
double result = 0.0; // total price including tax
result = myItems * myPricePerItem * myTaxRate;
return result;
}// end of totalTaxable
void displayName(string incoming)
{
cout << incoming << endl;
}// end of displayName