Thursday, May 1, 2008

Write a shell script to find the given number is positive or negative or zero.

echo “Enter a number”

read n

if [$n -lt 0] then

echo “positive”

else

echo “zero”

fi

No comments: