echo "Enter a number: "
read num
if [ `expr $num % 2` -eq 0 ]
then
echo "$num is Even."
else
echo "$num is Odd."
fi
-------------------------------------------------------------------------------------------------
->OUTPUT:
---------
Enter a number:
8
8 is Even.
*************************************************************************************************
0 comments:
Post a Comment