Header Ads Widget

Basic salary of an employee is input through the keyboard. The DA is 25% of the basic salary while the HRA is 15% of the basic salary. Provident Fund is deducted at the rate of 10% of the gross salary (BS+DA+HRA). Program to calculate the Net Salary :

 Basic salary of an employee is input through the keyboard. The DA is 25% of the basic salary while the HRA is 15% of the basic salary. Provident Fund is deducted at the rate of 10% of the gross salary (BS+DA+HRA). Program to calculate the Net Salary :

        Net salary is :-Basic salary -10% of (BS+DA+HRA)        

Code(Python):-

print("Enter the basic salary of the employee")
BS=int(input())
DA=0.25*BS # 25 percent of the basic salary
HRA=0.15*BS; # 15 percent of the basic salary
Net_salary=BS-(0.10*(BS+DA+HRA));
print("The net salary of the employee is: ",Net_salary)

Output:-


Enter the basic salary of the employee
25000
The net salary of the employee: 21500.0



Recommended Post :-

HCL Coding Questions:-

Capgemini Coding Questions:-

Companies interview:-

Full C course:-    

Key points:-

Cracking the coding interview:-

 Array and string:-

Tree and graph:-

Hackerearth Problems:-

Hackerrank Problems:-

Data structure:-

 MCQs:-