Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Wage Slip by Sean Slater
- */
- #include<iostream>
- #include<iomanip>
- using namespace std;
- int main()
- {
- const float basicPay = 12.50;
- const float tax = 0.25;
- float overtime, hours, grossPay, totalPay;
- cout << "How many hours worked" "\n";
- cin >> hours;
- cout << "\n";
- cout << "How much overtime" "\n";
- cin >> overtime;
- cout << "\n";
- cout << "Basic Hours" << setw(20) << "Overtime Hours" << setw(10) << "Rate" << "\n";
- cout << hours << setw(16) << overtime << setw(23) << basicPay;
- cout << "\n\n";
- cout << "Gross Pay" << setw(11) << "Tax" << setw(10) << "Pay" << "\n";
- cout << hours * basicPay + (overtime = basicPay * 1.5) << setw(15) << tax << setw(20) <<(hours * basicPay + (overtime = basicPay * 1.5))*.75;
- system("pause");
- return 0;
- }
Add Comment
Please, Sign In to add comment