Write a command-line tool /app/decimal calc that reads a sequence of operations from stdin (one per line)…
Write a command-line tool /app/decimal calc that reads a sequence of operations from stdin (one per line)…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input format (stdin): Lines containing operations, one of: - ADD a b - SUB a b - MUL a b - DIV a b precision…
The task
**Input format** (stdin): Lines containing operations, one of: - `ADD a b` - `SUB a b` - `MUL a b` - `DIV a b [precision]` - `ROUND a [precision]` - `FORMAT a [format_string]`
Part of ai-and/termgrade-environments.