Implement pp6calculator Day 2 Exercise 2 solution

Refactor math functions to return integer result codes, with
by-reference arguments in which to store the results.

Update menu while operations to call math functions with result
placeholders and get result code. Print an error message if an
operation returns a non-zero error code, with information on the
operator and value of the error code. If the operation is successful,
print the result(s) as before.

Error codes are not standardized, though we try to use different
positive integers within each function to indicate different forms of
error, e.g. divide-by-zero vs no real roots.