You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
264 B
27 lines
264 B
# calc.sh
|
|
|
|
a=5
|
|
b=10
|
|
|
|
# Summenbildung falsch
|
|
|
|
summe=a+b
|
|
|
|
echo "Summe falsch: ${summe}"
|
|
|
|
# Summenbildung korrekt
|
|
let c=a+b
|
|
|
|
echo "Summe: ${c}"
|
|
|
|
let d=b-a
|
|
|
|
echo "Differenz: ${d}"
|
|
|
|
e=$(expr ${a} \* ${b})
|
|
|
|
echo "Multiplikation: ${e}"
|
|
|
|
let f=b/a
|
|
|
|
echo "Division: ${f}"
|
|
|