It recursively subtracts until the number goes at or below zero. The iterations is the output and the reminder is how much it went below zero.
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
It recursively subtracts until the number goes at or below zero. The iterations is the output and the reminder is how much it went below zero.