//Jacob Silvestre CSC5 Chapter 2, P. 81, #3
//
/*************************************************************************
*
* COMPUTE SALES TAX
* ____________________________________________________________
* This program computes the total sales tax on a $52 purchase with
* a state tax rate of 4 percent and county tax of 2 percent.
*
* Computation is based on the formula:
* totalTax = .04 * 52 + .02 * 52
* ____________________________________________________________
* INPUT
* 52 : cost of purchase
* .04 : state tax rate
* .02 : county tax rate
*
* OUTPUT
* totalTax : total sales tax
*
*************************************************************************/
#include <iostream>
using namespace std;
int main()
{
double totalTax; //OUTPUT - Total sales tax
//
//Calculate total Sales tax
totalTax = .04 * 52 + .02 * 52;
//
// Output Result
cout << "The total sales tax is $"<< totalTax << endl;
return 0;
}
Ly9KYWNvYiBTaWx2ZXN0cmUgQ1NDNSBDaGFwdGVyIDIsIFAuIDgxLCAjMwovLwovKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogKgogKiBDT01QVVRFIFNBTEVTIFRBWAogKiBfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KICogVGhpcyBwcm9ncmFtIGNvbXB1dGVzIHRoZSB0b3RhbCBzYWxlcyB0YXggb24gYSAkNTIgcHVyY2hhc2Ugd2l0aCAgCiAqIGEgc3RhdGUgdGF4IHJhdGUgb2YgNCBwZXJjZW50IGFuZCBjb3VudHkgdGF4IG9mIDIgcGVyY2VudC4KICogCiAqIENvbXB1dGF0aW9uIGlzIGJhc2VkIG9uIHRoZSBmb3JtdWxhOgogKiB0b3RhbFRheCA9IC4wNCAqIDUyICsgLjAyICogNTIKICogX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCiAqIElOUFVUCiAqCTUyICAgICAgIDogY29zdCBvZiBwdXJjaGFzZQogKiAgLjA0IAkgOiBzdGF0ZSB0YXggcmF0ZQogKiAgLjAyCQkgOiBjb3VudHkgdGF4IHJhdGUgCiAqIAogKiBPVVRQVVQKICogdG90YWxUYXggIDogdG90YWwgc2FsZXMgdGF4CiAqCiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwojaW5jbHVkZSA8aW9zdHJlYW0+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpCnsKCWRvdWJsZSB0b3RhbFRheDsgLy9PVVRQVVQgLSBUb3RhbCBzYWxlcyB0YXgKCQoJLy8KCS8vQ2FsY3VsYXRlIHRvdGFsIFNhbGVzIHRheCAKCXRvdGFsVGF4ID0gLjA0ICogNTIgICsgLjAyICogNTI7IAoJCgkvLyAKCS8vIE91dHB1dCBSZXN1bHQKCWNvdXQgPDwgIlRoZSB0b3RhbCBzYWxlcyB0YXggaXMgJCI8PCB0b3RhbFRheCA8PCBlbmRsOyAKCQoJcmV0dXJuIDA7IAp9