Create a command-line tool /app/fixcalc that performs arithmetic operations on fixed-point decimal numbers…
Create a command-line tool /app/fixcalc that performs arithmetic operations on fixed-point decimal numbers…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input format (stdin): A text file where each non-empty line is one of: - A directive: PRECISION <n where n…
The task
**Input format (stdin):** A text file where each non-empty line is one of: - A directive: `PRECISION <n>` where n is an integer between 0 and 10 inclusive (sets decimal places for all subsequent operations until changed). - An operation line: `<op> <arg1> <arg2>` where: - `<op>` is one of: `ADD`, `SUB`, `MUL`, `DIV`…
Part of ai-and/termgrade-environments.