Rework the output format

Instead of printing the result first and then the equation number
(kind of) right-aligned, we first print the equation number and
then the answer. Like this:
 (1)  100
 (2)  23424
...
(10)  424234234
This solves a lot of formatting problems for when the width of the
terminal is variable. Furthermore it will also make it easier to
parse this form of output.