clear
echo "Enter the number to find whether even or odd"
read a
if [ `expr $a % 2` -eq 0 ]
then
echo "The number $a is even"
else
echo "the number $a is odd"
fi
Output
Enter the number to find whether even or odd
13
the number 13 is odd
Enter the number to find whether even or odd14
the number 14 is Even
echo "Enter the number to find whether even or odd"
read a
if [ `expr $a % 2` -eq 0 ]
then
echo "The number $a is even"
else
echo "the number $a is odd"
fi
Output
Enter the number to find whether even or odd
13
the number 13 is odd
Enter the number to find whether even or odd14
the number 14 is Even
We are urgently in need of KlDNEY donors for the sum of $500,000.00 USD, Email for more details:
ReplyDeletehospitalcarecenter@gmail.com
WhatsApp +91 779-583-3215