Change


British Coins

I was re-reading Isaac Asimov's, Realm of Numbers and saw a few examples of working with the old British system of coinage and figured I'd try my hand at putting together a very simple calculator.

The rules are a bit complicated compared to the US system:

Here is a very sloppy alpha version I put together.

Internally I limit my accuracy to farthings, and normalize the result. A bare minimum of sanity checking is done. I commit the cardinal sin of C programming and use scanf for inputting the currency amounts. It appears to work for the examples I've fed it from the book. As usual garbage in yields garbage out.

The Code

Download

M. Chappell 5 November 2025


Wednesday, 5 November 2025   Michael J. Chappell   Contact me at: mcsuper5@freeshell.org Made with Emacs