#! /bin/sh
# Write a shell script to read a basic salary of an employee, if basic salary is less than or equal to 5000 then DA will according to 50% of the basic salary and gross salary will be computed as DA + basic salary. If basic salary greater than 5000 then DA according to 25% of basic salary and gross will be DA + basic.
echo "Enter the basic salary of an employee "
read basic
if test $basic -le 5000
then
DA=0.5*$basic
gross=$DA +$basic
echo "The gross salary of an employee is "
echo $gross
else
DA=0.25*$basic
gross=$DA +$basic
echo "The gross salary of an employee is "
echo $gross
fi
# Write a shell script to read a basic salary of an employee, if basic salary is less than or equal to 5000 then DA will according to 50% of the basic salary and gross salary will be computed as DA + basic salary. If basic salary greater than 5000 then DA according to 25% of basic salary and gross will be DA + basic.
echo "Enter the basic salary of an employee "
read basic
if test $basic -le 5000
then
DA=0.5*$basic
gross=$DA +$basic
echo "The gross salary of an employee is "
echo $gross
else
DA=0.25*$basic
gross=$DA +$basic
echo "The gross salary of an employee is "
echo $gross
fi


