You must create a command-line tool /app/bin/dcalc that performs exact decimal arithmetic using fixed-point…
You must create a command-line tool /app/bin/dcalc that performs exact decimal arithmetic using fixed-point…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input contract: - Each line of input is a single expression: operand1 operator operand2 - Operands are…
The task
**Input contract:** - Each line of input is a single expression: `operand1 operator operand2` - Operands are decimal numbers with EXACTLY 4 decimal places (e.g., `3.1400`, `-0.0050`, `100.0000`) - Operators: `+` (add), `-` (subtract), `*` (multiply), `/` (divide) - Multiplication result must be rounded to 4 decimal…
Part of ai-and/termgrade-environments.