#TO DEMONSTRATE NESTED IF ELSE USING SHELL SCRIPTING.
echo "Enter percentage: "
read a
if [ $a -ge 75 ]
then
echo "First Class Distinction"
elif [ $a -ge 60 ]
then
echo "First Class"
elif [ $a -ge 40 ]
then
echo "Second Class"
else
echo "Fail"
fi
#OUTPUT:
#Enter percentage:
#75
#First Class Distinction
No comments:
Post a Comment