echo "Enter Basic Salary: "
read b
hra=0
da=0
if [ $b -gt 1500 ]
then
hra=500
da=`expr $b \* 98 / 100`
else
hra=`expr $b \* 10 / 100`
da=`expr $b \* 90 / 100`
fi
gs=`expr $b + $hra + $da`
echo "Gross Salary is: Rs.$gs"
echo "Details:"
echo "Basic: Rs.$b"
echo "HRA: Rs.$hra"
echo "DA: Rs.$da"
--------------------------------------------------------------------------------------------------------------
OUTPUT
Enter Basic Salary:
15000
Gross Salary is: Rs.30200
Details:
Basic: Rs.15000
HRA: Rs.500
DA: Rs.14700
1 comments:
waooo you are the best among the best....
i love your code my friend
Post a Comment