// round function

#include <iostream>
#include <cstdlib>
using namespace std;

int roundToWholeNum(double myNum);
double computeSalesTax(double myBasePrice);
void printFinalPrice(double myPrice);

const double PA_TAX = 0.06;

int main()
{
	double num = 0;
	int roundedNum = 0;
	double priceWithTax = 0.0;

	cout << "Enter price: ";
	cin >> num;

	roundedNum = roundToWholeNum(num);

	priceWithTax = computeSalesTax(roundedNum) + roundedNum;
	
	printFinalPrice(priceWithTax);

	system("pause");
	return 0;
}// end of main

int roundToWholeNum(double myNum)
{
	int correctAnswer = 0;

	correctAnswer = int (myNum + 0.5);
	return correctAnswer;
}// end of roundToWholeNum


double computeSalesTax(double myBasePrice)
{
	return myBasePrice * PA_TAX;
}// end of computeSalesTax

void printFinalPrice(double myPrice)
{
	cout << "Your price is $" << myPrice << endl;
}// end of printFinalPRice



