Answer the question
In order to leave comments, you need to log in
What is wrong in bash code?
Define a triangle. What's wrong? :(
#!/bin/bash
read a
read b
read c
if [ $(($a + $b)) -le $c ] || [ $(($a + $c)) -le $b ] || [ $(($b + $c)) -le $a ]
then
echo "ERROR"
elif [ $a -ne $b ] $$ [ $a -ne $c ] $$ [ $b -ne $c ]
then
echo "SCALENE"
elif [ $a -eq $b ] $$ [ $b -eq $c ]
then
echo "EQUILATERAL"
else
echo "ISOSCELES"
fi
fi
fi
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question