Exercise: calculator STDIN
Write a command-line calculator that works with the 4 basic operators +-*/ like this:
$ go run cacl.go a: 3 op: + b: 4 7 $ go run calc.go a: 8 op: / b: 2 4
- 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 a: 3 op: + b: 4 7 $ go run calc.go a: 8 op: / b: 2 4