funvoidchange(intcents){cents/25=>constintcoin25;coin25*25-=>cents;cents/10=>constintcoin10;coin10*10-=>cents;cents/5=>constintcoin5;coin5*5-=>cents;#! this is a comment
#! below is the debug print.
<<<"{ ","25 => ",coin25,", 10 => ",coin10,", 5 => ",coin5,", 1 => ",cents," }">>>;}31=>change;
prints
{25=>1,10=>0,5=>1,1=>1}
It probably could be written better, but looks like it gets the job done.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Just my two cents, in Gwion
prints
It probably could be written better, but looks like it gets the job done.