Balancing Accounts

Difficulty: Medium

Your bank receives two deposits or credits and three bills or debits. The credits cover the debits, meaning that your balance should never go below zero, but the bank has clever software: The bills are calculated first, which thrusts your account into negative territory complete with fees — even though the deposits cover the bills. Is this obnoxious behavior the result of greedy bankers or clever programming?
Continue reading

Exploring the strfmon() Function

The C programming language doesn’t sport the thousands of functions (or methods or what-have-you) available in Java. They say Java programmers may never use or even know the variety. With many fewer functions available in the standard C library, I would think to know them all. Then along comes another one I’ve neither used nor heard of. This week’s Lesson covers such as function, strfmon().
Continue reading