You are viewing a single comment's thread. Return to all comments →
This condition for equilateral is enough
if [ $x -eq $y ] && [ $y -eq $z ]
Your condition for SCALENE is wrong but passes the tests. It fails for 3 4 3 since your last condition is the same as the second one.
if [ $y -ne $z ] && [ $z -ne $y ]
This is the same. What you want is :
if [ $x -ne $y ] && [ $x -ne $z ] && [ $y -ne $z ]
More on Conditionals
You are viewing a single comment's thread. Return to all comments →
This condition for equilateral is enough
Your condition for SCALENE is wrong but passes the tests. It fails for 3 4 3 since your last condition is the same as the second one.
This is the same. What you want is :