Sunday 10 August 2014

Write a shell script that compute gross salary of an employee, accordingly to rule given below.


If basic salary is < 15000 then HRA=10% of basic 7 DA=90% of basic.
If basic salary is >=15000 then HRA=500 of basic & DA=98% of basic.
Echo ―enter Basic salary‖
read basic
if [ $basic -lt 15000 ]
then
hra=`expr 10 \* $basic / 100`
da=`expr 90 \* $basic / 100`
else
hra=`expr 50 \* $basic / 100`
da=`expr 98 \* $basic / 100`
fi
gs=`expr $basic + $hra + $da`
echo "Gross salary : Rs. $gs"

1 comments:

Unknown said...

It is genuinely very useful for me. I like your put up simply because it is very useful for me as effectively in write my essay reviews. Hoping the exact same best operate in the upcoming times also.

Post a Comment

 
- |