Exercise: calculator
Write a command-line calculator that works with the 4 basic operators +-*/ like this:
$ go run cacl.go 3 + 4 7 $ go run calc.go 8 / 2 4
- Does multiplication also work?
- What happens if we try to divide by 0?
Write a command-line calculator that works with the 4 basic operators +-*/ like this:
$ go run cacl.go 3 + 4 7 $ go run calc.go 8 / 2 4