Answer to Question #146786 in C++ for Ashhar

Question #146786
1. There are 10 employees in the organization
2. There are 2 employees of level-A, 3 employees of level-B, 5 employees of level-C.
3. The information about their salaries is given below.
a) The salary of level-A employee is Rs.1, 25,000.
b) The salary of level-B employee is Rs.80, 000.
The salary of level-C employee is Rs.45, 000.
4. Rs.600 is deducted from the salaries of all employees against staff welfare fund.
5. If ANNUAL salary of an employee is more than Rs.600, 000, 1% tax is deducted from salary each month.
1) Total monthly tax deduction for all employees
1
Expert's answer
2020-11-26T08:11:47-0500
#include<iostream>
using namespace std;
int main(){
int la=2,lb=3,lc=5; //defining the no of employee each class
int sla=125000,slb=80000,slc=45000; //salary declaration for all three class
sla-=600;
slb-=600;
slc-=600;
double taxpm=0;
if(sla>50000)taxpm+=sla*.01*la; //if monthly salary is greater than 50k for first class
if(slb>50000)taxpm+=slb*.01*lb; //for second class
if(slc>50000)taxpm+=slc*.01*lc; //for third class
cout<<"Total tax deduction per month for all employees: "<<taxpm; //print total tax
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