Program in Prolog that returns change
<p>I want to write a program that returns change in Prolog, I tried this predicate but I'm not sure about it, cuz I wanted to do the same as in the C/C++ program. If Anyone has a correction about that I would appreciate it.</p>

<pre><code>dollar(100).
quarter(25).
dime(1).


return(0,0,0).
return(Amount_recieved,Amount_due,Change) :-
   Change is Amount_recieved - Amount_due.

dollar(100) is Change / 100 , Change is Change mod 100.
quarter(25) is Change /25 , Change is Change mod 25.
dime(1) is Change
</code></pre>