#include #include const float LOWRATE = 0.02; // lower tax rate const float HIGHRATE = 0.025; // higher tax rate const float CUTOFF = 20000.0; // cut off for low rate const float FIXEDAMT = 400; // fixed dollar amount for higher rate amounts int main() { float taxable, taxes; cout << "Please type in the taxable income: "; cin >> taxable; if (taxable <= CUTOFF) taxes = LOWRATE * taxable; else taxes = HIGHRATE * (taxable - CUTOFF) + FIXEDAMT; // set output format cout << setiosflags(ios::fixed) << setiosflags(ios::showpoint) << setprecision(2); cout << "Taxes are $ " << taxes << endl; return 0; }