Let’s write a simple console calculator that performs basic arithmetic operations. First, we give it the numbers with which we want to perform operations using the `add <number>`

command (we can give several numbers). Then we can use the commands `inc`

, `acc`

, `sub`

, `mul`

, `div`

, `mod`

; to do calculations: we enter the index of the number to work with and then the operator arguments. `Show`

can be used to display the numbers entered earlier; `exit`

to exit the program.

Example output:

`add 42 13`

`Operands: 42 13`

`inc 0 1`

`[43 13]`

`mod 1 3`

`[43 1]`

`exit`