-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSRMSalaryWork.py
More file actions
28 lines (23 loc) · 878 Bytes
/
SRMSalaryWork.py
File metadata and controls
28 lines (23 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#Q. 2:
#SRM Salary Work(Input and Output)
#In a company an employee is paid as under: If his basic salary is less than Rs. 1500, then HRA = 10% of base salary and DA = 90% of basic salary.
#If his salary is either equal to or above Rs. 1500, then HRA = Rs. 500 and DA = 98% of basic salary. If the Employee's salary is input, write a program to find his gross salary.
#NOTE: Gross Salary = Basic Salary+HRA+DA
#Input
#The first line contains an integer T, total number of testcases. Then follow T lines, each line contains an integer salary.
#Output
#Output the gross salary of the employee.
#Constraints
#1<=T<=1000
#1<=salary<=100000
T = int(input())
for x in range(T):
basic = int(input())
if basic < 1500:
HRA = 0.1 * basic
DA = 0.9 * basic
elif basic >= 1500:
HRA = 500
DA = 0.98 * basic
gross = basic + HRA + DA
print(gross)