You are viewing a single comment's thread. Return to all comments →
Four hours or so and i've got this.
#!/bin/bash read x read y if [ "$x" -ge "-100" ] && [ "$y" -ge "-100" ] && [ "$x" -le "100" ] && [ "$y" -le "100" ] && [ "$y" -ne "0" ]; then echo "$x + $y" | bc echo "$x - $y" | bc echo "$x * $y" | bc echo "$x / $y" | bc else echo "ERROR" fi
works like a charm. probably messy. i'm extremely new to bash-scripts.
Seems like cookies are disabled on this browser, please enable them to open this website
The World of Numbers
You are viewing a single comment's thread. Return to all comments →
Four hours or so and i've got this.
works like a charm. probably messy. i'm extremely new to bash-scripts.