ax^2+bx+c=0 problem
#!/bin/sh entering_number() { echo “Please enter $1” read N if [[ -z $N ]] then echo “$1 must not be blank” return 1 else if [[ ! $N =~ ^([-])?([0-9]*[.])?[0-9]*$ ]] then echo “$1 is not a number” return 1 fi fi case $1 in “A”) A=$N ;; “B”) B=$N ;; “C”) C=$N ;; esac […]
ax^2+bx+c=0 problem Read More »