Pa 3

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Pa 3 as PDF for free.

More details

  • Words: 178
  • Pages: 1
#include #include using namespace std; int main() { double hours, hourlyrate; double grosspay, taxes, netpay, taxamount; string percentage; cout << "enter hours: " << endl; cin >> hours; cout << "enter hourly rate: " << endl; cin >> hourlyrate; grosspay = hour * hourlyrate; if (grosspay >= 400) { taxes = 0.20; percentage = "20%"; } else if (grosspay >= 200) { taxes = 0.15; percentage = "15%"} { else if (grosspay > 0) { taxes = 0.10; percentage = "10%"; } else if (grosspay <= 0) { cout << "one or either number provided is incorrect. \endl"; cout << "plese re-enter", } netpay = grosspay * (1 - taxes); taxamount = grosspay * taxes; cout << fixed << showpoint; cout cout setw(5) << cout cout }

<< setprecision(2) << "gross pay: << setprecision(2) << "taxes: "(" << percentage << ")" << endl; << setw(20) << "------"; << setprecision(2) << "net pay:

return 0;

$ " << setw(6) << grosspay << endl; " << setw(6) << taxamount << $ " << setw(6) << netpay << endl;

Related Documents

Pa 3
November 2019 9
Pa 3
November 2019 9
Pa Gin A 3
October 2019 14
Hge1-pa (3).pdf
December 2019 8
Pa 3.docx
June 2020 1
Pa 3 - Solucion.xlsx
November 2019 23