Shell Script Program To Find Greatest Of Three Numbers

echo "Enter first number:"
read a

echo "Enter second number:"
read b

echo "Enter third number:"
read c

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

elif [ $b -gt $c -a $b -gt $a ]
then
	echo "$b is greatest"

else
	echo "$c is greatest"

fi

Leave a comment