Shell Programming - biggest of given three numbers

# Shell Programming
# Biggest of three numbers

echo -n "Enter three numbers : "
read a b c

if [ $a -gt $b ]

then

if [ $a -gt $c ]
then
echo "Biggest is $a"

else
echo "Biggest is $c"
fi

else
if [ $b -gt $c ]
then
echo "Biggest is $b"

else
echo "Biggest is $c"
fi

fi

No comments:

Post a Comment

Don't be a silent reader...
Leave your comments...

Anu