Shell Programming - even odd

# Shell Programming
# Even or Odd


echo -n "Enter a number : "

read n



if [ `expr $n % 2` -eq 0 ]

then

         echo "$n is Even"

else

          echo "$n is Odd"

fi

No comments:

Post a Comment

Don't be a silent reader...
Leave your comments...

Anu