Declare and define the necessary function to calculate pension, growth salary, income tax, total deduction, and net salary of an employee when it is called and return a value to the caller.
Hint:
The program is expected to Input basic salary, allowance and credit association as an input and displays basic salary, allowance, credit association, growth salary, pension, income tax, total deduction and net payment as an output.
Employee earn additional money as allowance monthly (different values of allowance).
Employee must pay money monthly as a credit association (different values of credit association)
Pension=(BasicSalary*.07) when it is called and return a value to the main function ()
GrowthSalary=(BasicSalary +allowance) when a function is called and return avalue to the caller.
TotalDeduction=(Pension+IncomeTax+ CreditAssociation) when a function is called and return a value.
NetPay=(GrowthSalary-TotalDeduction) when it is called and return a value to the main program
#include<bits/stdc++.h>
using namespace std;
int main ()
{
int salary, allowance, credit_association, btn, Pension, GrowthSalary, TotalDeduction, NetPay;
cout << "Enter your Salary: ";
cin >> salary;
cout << "Enter your Allowance: ";
cin >> allowance;
cout << "Enter your Credit Association: ";
cin >> credit_association;
Pension = salary * 0.7;
cout << "Your Pension is : " << Pension << endl;
GrowthSalary = (salary + allowance);
cout << "Your GrowthSalary is : " << GrowthSalary << endl;
TotalDeduction = (Pension + credit_association);
cout << "Your TotalDeduction is : " << TotalDeduction << endl;
NetPay = (GrowthSalary - TotalDeduction);
cout << "Your NetPay is : " << NetPay << endl;
}
Comments
Leave a comment