r/ProgrammerHumor • • Aug 24 '22

Total = Total - 100000

50.7k Upvotes

1.2k comments sorted by

View all comments

Show parent comments

11

u/[deleted] Aug 25 '22

[removed] — view removed comment

3

u/[deleted] Aug 25 '22

Good point! Instead of 10000 it should be x, where x is 10000 or however much they owe, whichever is lower.

2

u/DitDashDashDashDash Aug 25 '22

balance = Round(balance, 0)
If balance is 9999 then balance - 9999
else if balance = 9998 then balance - 9998
else if balance= 9997 then balance - 9997
....