Answer to Question #281299 in C++ for Isroz

Question #281299

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



1
Expert's answer
2021-12-20T10:02:06-0500
#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;



}

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