/* Computer Science & Programming Jason M. Snouffer Wednesday, September 18, 2002 Lab 3 Extra Credit This program calculates the weekly salary of an employee using an inputed value for hours and pay rate, and it calculate overtime for hours worked past 40. Test Suite: Input for hours: 40 Input for payrate: 5 Expected Output: Your weekly salary will be $200.00. Input for hours: 10 Input for payrate: 3 Expected Output: Your weekly salary will be $30.00. Input for hours: 0 Input for payrate: 6.50 Expected Output: Your weekly salary will be $0.00. Input for hours: 45 Input for payrate: 0 Expected Output: Your weekly salary will be $0.00. Input for hours: 1 Input for payrate: 300.00 Expected Output: Your weekly salary will be $300.00. Input for hours: 300 Input for payrate: 1 Expected Output: Your weekly salary will be $430.00. Input for hours: -30 Input for payrate: -5 Expected Output: Your weekly salary will be $150.00. Input for hours: 65 Input for payrate: -1 Expected Output: Your weekly salary will be $-77.50. Input for hours: 50 Input for payrate: 5 Expected Output: Your weekly salary will be $275.00. Input for hours: 39.5 Input for payrate: 10 Expected Output: Your weekly salary will be $395.00. Input for hours: 40.5 Input for payrate: 6 Expected Output: Your weekly salary will be $244.50. Input for hours: 55 Input for payrate: 3 Expected Output: Your weekly salary will be $187.50. Input for hours: 80 Input for payrate: 6 Expected Output: Your weekly salary will be $600.00. Input for hours: 10 Input for payrate: $5.00 Expected Output: unknown output (actual output: Your weekly salary will be $-9.256...00.) Input for hours: ten Input for payrate: Expected Output: unknown output (actual output: Please enter your hourly pay rate: Your weekly salary will be $8.57...00.) Input for hours: 300000000 Input for payrate: 5 Expected Output: unknown output. (actual output: Your weekly salary will be $2.25...00.) Input for hours: 10 Input for payrate: 300000000 Expected Output: Your weekly salary will be $3000000000. (actual output: Your weekly salary will be $3.00...00.) All of the sample inputs within this test suite were tested and performed as expected. */ #include #include using namespace std; int main () { double salary, pay_rate, ot_pay, standard_pay, hours, overtime_hrs; const int HOURS_IN_WEEK = 40; cout.setf(ios::fixed); cout.setf(ios::showpoint); cout.precision(2); cout << "Please enter the hours you worked this week: "; cin >> hours; cout << "Please enter your hourly pay rate: "; cin >> pay_rate; if (hours <= HOURS_IN_WEEK) { salary = hours * pay_rate; } else { standard_pay = HOURS_IN_WEEK * pay_rate; overtime_hrs = hours - HOURS_IN_WEEK; ot_pay = overtime_hrs * pay_rate * 1.5; salary = ot_pay + standard_pay; } cout << "Your weekly salary will be $"<