Saturday, August 29, 2020

Positive and Negative Number Checker in Bash

 A simple program that I wrote using that will ask the user to give a number and then the program will check if the given number is a positive or negative number using bash scripting language. 

I am currently accepting programming work inventory system, enrollment system, accounting system, point of sale, school programming assignments and projects, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. 

Thank you. My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com. My mobile number here in the Philippines is 09173084360. My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675. Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking, and Arduino Project development at a very affordable price. My personal website is http://www.jakerpomperada.com

 

Program Listing

 

# positive_negative.sh
#Bash Script to check whether a number is positive or not
#Jake R. Pomperada,MAED-IT,MIT
# Bacolod City, Negros Occidental
# jakerpomperada@gmail.com

printf  "\n\n"
printf  "\tPositive and Negative Number Checker in Bash"
printf   "\n\n"
read -p "Enter a number: " number
printf "\n"
if [ $number -ge 0 ]
then
  printf "\tThe given number $number is positive."
else
  printf "\tThe given number $number is negative."
fi
printf "\n\n"
printf  "\tEnd of Program"
printf "\n"
 

No comments:

Post a Comment