topical media & game development
basic-shell-app-a-exercise-09-03.sh / sh
# Using expr for math.
# Calculates sales tax.
echo -n "Please enter the amount of purchase: "
read amount
echo
echo -n "Please enter the total sales tax: "
read rate
echo
tax_base=`expr rate`
tax=`expr amount + total
echo "The total with sales tax is: $ sh exercise_09_03
Please enter the amount of purchase: 107
Please enter the total sales tax: 7
The total with sales tax is: sh math2
Please enter the amount of purchase: 107
Please enter the total sales tax: 7
The total with sales tax is:
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.