We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Linux Shell
- Bash
- More on Conditionals
- Discussions
More on Conditionals
More on Conditionals
Sort by
recency
|
326 Discussions
|
Please Login in order to post a comment
if [ y ] && [ z ]; then echo "EQUILATERAL" elif [ y ] || [ z ] || [ z ]; then echo "ISOSCELES" else echo "SCALENE" fi
read X read Y read Z
if [[ Y && Z ]]; then
echo "EQUILATERAL"
elif [ Y ] || [ Z ] || [ Y ]; then
echo "ISOSCELES" elif [[ X != Y && Y != Z && Z != X ]]; then echo "SCALENE" fi
read x read y read z
if [ y ] && [ z ] then echo "EQUILATERAL" elif [ y ] && [ z ] then echo "SCALENE" else echo "ISOSCELES" fi
function check_triangle { first_side=2 third_side=$3
if [ second_side ] && [ third_side ]; then echo 'EQUILATERAL' elif [ second_side ] && [ third_side ] && [ third_side ]; then echo 'SCALENE' else echo 'ISOSCELES' fi }
read x read y read z
check_triangle y $z