Started övning 4, labb 6

This commit is contained in:
2013-12-19 15:29:29 +01:00
parent 71534704f2
commit b446f85659
7 changed files with 171 additions and 0 deletions

34
Labb6/ovning4/calc.sh Normal file
View File

@@ -0,0 +1,34 @@
#!/bin/bash
# Jack-Benny Persson
# LX13
# Övning 4, labb 6
# Make a calculator that could do add, substract, divide and times
# Define our variables
Nr1=$1
Nr2=$2
# Define our functions
add()
{
Sum=$((Nr1+Nr2))
}
sub()
{
Sum=$((Nr1-Nr2))
}
div()
{
Sum=$((Nr1/Nr2))
}
tim()
{
Sum=$((Nr*Nr2))
}
# Main