Wednesday, June 29, 2011

SALES TAX example

//***********************
//***********************
//***********************
//
// Copyright (c) Wameland
//
//
//
// This software is distributed WITHOUT
//ANY WARRANTY. No claims are made
// as to its functionality or purpose.
//
// Date: 7/15/
// $Revision: 1.4 $
// $Name: forBlog1 $
//
//
//***********************
//***********************
//***********************

// Program 2.2: Compute sales tax on a
//purchase price
#include <iostream>
#include <string>

using namespace std;

int main(void) {
   
    // Input price
    cout << "Purchase price ? " << flush;
    float Price;
    cin >> Price;

    // Compute and output sales tax
    cout << "Sales tax on $" << Price << " is ";
    float TaxRate = 0.075;
    cout << "$" << Price * TaxRate << endl;
    return 0;
}

No comments:

Post a Comment