Division operator implemented in Prolog with substraction only.
- In a terminal, launch prolog by using the
prolog
command. - Load the file
[div].
- Perform divisions using the
div/4
function.- First argument is dividend.
- Second argument is divisor.
- Third argument is division result.
- Fourth argument is division rest.