Write a script to find if a number is positive or negative or zero. Hint (num=0 ---zero) (Num<0 --- negative) ( num >0 --- postive)
1
Expert's answer
2021-10-24T18:32:23-0400
#!/bin/bash
echo "Input number";
read number;
if (( number > 0)); then
echo "Positive";
elif (( number < 0)); then
echo "Negative";
else
echo "Zero";
fi
Comments
Leave a comment