A firm pays to its employees a special allowance.
if basic pay is more than rs.3000 - 40% of the basic pay is paid as special allowance. Other wise-50% is paid as allowance. House rent allowance is paid at 30% basic pay is more than rs.2500, and at 20% otherwise.Income tax is calculated at the rate of 25% if the total salary exceeds Rs. 5000 per month.Input basic pay and calculate the net salary payable and display.
if basic pay is more than rs.3000 - 40% of the basic pay is paid as special allowance. Other wise-50% is paid as allowance. House rent allowance is paid at 30% basic pay is more than rs.2500, and at 20% otherwise.Income tax is calculated at the rate of 25% if the total salary exceeds Rs. 5000 per month.Input basic pay and calculate the net salary payable and display.
class Salary
{ public static void main(String args[])
{ float A,B,C,T,N;
A=2250;
if(A>3000)
B= A*40/100;
else
B = A*50/100;
if(A>2500)
C = A*30/100;
else
C= A*20/100;
T= A+B+C ;
if(T>5000)
N= T*75/100;
else
N=T;
System.out.println( "The net salary is Rs" + N);
}
}
0 comments:
Post a Comment