Answer to Question #181460 in C++ for Skye Jordan

Question #181460

Create program using appropriate control structure. 


3. Suria is ready to develop a system that will automate the process of calculating payroll for employees worked at Infinity Design Solution Sdn. Bhd. Each employee will be recognized by employee ID. The system will receive gross income, allowance, overtime, income tax and loan deduction. The system will automatically calculate the total income, total deduction and net salary for the employee. System will calculate the total income based total deduction. Help Suria to create the program.


1
Expert's answer
2021-04-14T13:14:03-0400
#include <iostream>


using namespace std;


int main()
{
    double income, allowance, overtime_money;
    double income_tax = 0.15, loan;
    int hours_overtime;
    cout << "Enter the income: ";
    cin >> income;
    cout << "Enter allowance an employee: ";
    cin >> allowance;
    cout << "Enter how many hours your employee worked overtime: ";
    cin >> hours_overtime;
    cout << "Enter overtime money for one hour: ";
    cin >> overtime_money;
    cout << "Enter loan %: ";
    cin >> loan;
    double overtime = hours_overtime * overtime_money;
    double gross_income = income + allowance + overtime;
    double loan_deduction = loan/100 * 1000;
    double salary = gross_income - loan_deduction - (gross_income * income_tax);
    cout << "The final salary for this employee = " << salary;


    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS