Computer Science, asked by sakshisrivastava12, 9 months ago

Write a program to initialize salary of an employee as 30000.0 in variable salary. Compute the

following allowances and net salary as follows:

net salary = total salary – income tax

The deductions and total salary is computed as:

DA = 17% of salary

HRA = 10 % of salary

Income tax = 5% of salary

Total salary = salary + DA + HRA

Print salary, total salary, income tax and net salary of the employee. Use suitable variable for each

activity.​

Answers

Answered by srajfaroquee
2

Answer:

Note: I am writing the code only for the main function.

C++ codes:

int main(){

float salary,net_salary,total_salary, income_tax, da, hra;

salary = 30000.00 ;

da = (17/100)*salary;

hra = (10/100)*salary ;

income_tax = (5/100)*salary ;

total_salary = salary+da+hra ;

net_salary = total_salary - income_tax ;

cout<<"Salary : " <<salary ;

cout<<"Total Salary : " <<total_salary ;

cout<<"Income tax : " <<income_tax ;

cout<<"Net Salary : " <<net_salary ;

return 0;

}

//Please mark this ans as Brainliest answer! Thank you.!

Answered by Anonymous
0

A sinecure... is an office, carrying a salary or otherwise generating income, that requires or involves little or no responsibility, labour, or active service.

Similar questions