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