An old Arabian legend has it that a fabulously wealthy but unthinking king agreed to give a beggar one cent and double the amount for 64 days. Using this information, write, run, and test a C++ program that displays how much the king must pay the beggar on each day. The output of your program should appear as follows:
Day Amount Owed
--- ------------------
1 0.01
2 0.02
3 0.04
. .
. .
. .
64 .
Comments
Leave a comment