In this article I would like to share with you a program that I wrote using BASH scripting language in Linux operating system I called this program Odd and Even Number Checker in BASH. This program is very simple and easy to understand the programs logic.
If you like my works please send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com. People here in the Philippine can reach me at my mobile number at 09173084360.
Thank you very much and Happy Computing.
Sample Program Output
Program Listing
#!/bin/bash
echo -e "\n\n"
echo -e "\t\t Odd Or Even Number Checker in BASH"
echo -e "\n"
read -p "Kindly Enter a Number :=> " value
echo -e "\n"
check=$(($value % 2))
if [ $check -eq 0 ]
then
echo "The number $value is an EVEN number."
else
echo "The number $value is an ODD number."
fi
echo -e "\n"
echo -e "Thank you for using this program."