From the fifth chapter of Stephen Prata’s book “C Primer Plus” – a program based on a well-known proverb that illustrates exponential growth.
Background:
The king offered to choose a reward for the hero’s service; the hero asked to put one grain on the first cell on the chessboard, two grains on the second, four on the third, and to double the grains in this way until the board is full. The king was struck by modesty and agreed .. What came of it:
Continue reading
