TotalCodes
Menu
Android
Data Structure
Oracle(PL/SQL)
Shell Scripts
Monday, 27 May 2013
Shell Script to find even and odd numbers
echo -n "Enter Number:- "
read num
n=$(($num%2))
if test $n -eq 0
then
echo "$num is Even Number"
else
echo "$num is Odd Number"
fi
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment