Adding more comments to the output.
Removing the superfluous keywords "then", "endif", "do", and "done".
Adding an input statement.
Fixing a mistake in the syntax, where a unary minus was before an Expression rather than before a Factor. This removed all the ambiguity warnings except for the one about the dangling else.