You are on page 1of 1

echo "enter a number"

read n

if [ `expr $n % 2` = 0 ]
then
echo "this is even number"
else
echo "this is odd number"
fi

You might also like