isoceles unix
read a
read b
read c
if [ $a -eq $b -a $b -eq $c ]
then
echo "EQUILATERAL"
elif [ $a -eq $b -o $b -eq $c -o $c -eq $a ]
then
echo "ISOSCELES"
else
echo "SCALENE"
fi
read b
read c
if [ $a -eq $b -a $b -eq $c ]
then
echo "EQUILATERAL"
elif [ $a -eq $b -o $b -eq $c -o $c -eq $a ]
then
echo "ISOSCELES"
else
echo "SCALENE"
fi
Comments
Post a Comment