Headlines
Loading...
program in UNIX which accepts three sides of triangle and check triangle can be formed or not.

program in UNIX which accepts three sides of triangle and check triangle can be formed or not.

Write a shell script which accepts three sides of triangle and check triangle can be formed or not.
echo "enter the 3 sides of da trngle"
read x  y  z

if [ `expr $x + $y` -gt $z -o `expr $y + $z` -gt $x -o `expr $x + $z` -gt $y ]
then
echo "The triangle can be formed "
else
echo "Triangle can not be formed!!"
fi
*** PLEASE checkout the Best deals from for top sites like Amazon, Flipkart etc ***