24 lines
502 B
C++
24 lines
502 B
C++
|
|
#include <iostream>
|
|
#include <ostream>
|
|
|
|
using namespace std;
|
|
|
|
int main() {
|
|
|
|
double sale = 95000;
|
|
cout << "Sale: $" << sale << endl;
|
|
|
|
const double stateTaxRate = .04;
|
|
double stateTax = sale * stateTaxRate;
|
|
cout << "State tax: $" << stateTax << endl;
|
|
|
|
const double countyTaxRate = .02;
|
|
double countyTax = sale * countyTax;
|
|
cout << "County tax: $" << countyTax << endl;
|
|
|
|
double totalTax = stateTax + countyTax;
|
|
cout << "Total tax: $" << totalTax;
|
|
|
|
return 0;
|
|
}
|