//Xinnuo Wang CS1A chapter 2, P.81 # 3
//
/*******************************************************************************
*
* COMPUTE SALES TAX
*______________________________________________________________________________
* This program computes the total sales tax on a $52 purchase. Assume the
* state sales tax is 4 percent and the county sales tax is 2 percent.
*
* Computation is based on the formula:
* sales tax = price x percentage
* _____________________________________________________________________________
* INPUT
* price : The price of a staff
* percentage : The tax percentage of the staff
*
* OUTPUT
* sales tax : the tax of the staff
*
******************************************************************************/
#include <iostream>
using namespace std;
int main()
{
int price; //INPUT - The price of a staff
float percentage; //INPUT - The tax percentage of the staff
float salesTax; //OUTPUT - the tax of the staff
//
// Initialize Program Variables
price = 52;
percentage = 0.02;
//
// compute Sales Tax
salesTax = price * percentage;
//
// Output Result
cout << "The sales tax is : $" << salesTax << "dollars" << endl;
return 0;
}