Believe or not it is not hard to figure out but time consuming Instead of pennies we can use math exponents:
For the first square write down 2 ^0,
second square write down 2^1 ,
third square write down 2^2
Forth square write down 2^3
until we reach the 64th square 2^63 . Now go to Google calculator and type in ( (2^0) + (2^1) + (2^2) + (2^3) etc and once you get to (2^63) press the equal sign for the total.
Yes, that is time consuming ,unless we have a commode 64, or any other computer that has the "BASIC" language. Here is the program listing .press RETURN after typing each line number and text.
50 PRINT CHR$(147)
100 FOR X = 0 TO 63
105 PRINT ( 2↑X)
110 T = T + ( 2↑X)
120 NEXT X
130 PRINT "TOTAL: " T
Line 105 displays how many pennies are on each square ; While line 110 adds all the pennies on each of the squares.Line 130 displays the complete total. Notice that the word " TOTAL: " is enclose in quotes.
You will notice that the program uses math exponents or the power of each number.For example 2 or any number that is not zero in the power of zero is equal to 1. Zero in the zero power is undefined.
When done simply type "RUN" without the quotes and press the 'RETURN' key .It will reveal the answer within 5 seconds.
It will display: TOTAL: 1.84467441E+19. That (E+19) means to move the decimal point to the right 19 places yielding the result of 18,446,744,100,000,000,000 pennies.
To get the dollar amount simply omit the last two zeroes.
Explaining the for-next statement:
On the first round X will have a value of zero making ( 2↑X) equal to ( 2↑0) which in turn equals 1.
When the "next" statement is reached X will now have a value of 1 making ( 2↑X) equal to ( 2↑1) which equals to 2.
On the third round X will be equal to 2
making ( 2↑X) equal to ( 2↑2) =2 x 2 = 4
On the fourth round X will be equal to 3
making ( 2↑X) equal to ( 2↑3) =2 x 2 x 2 = 8
On the fifth round X will be equal to 4
making ( 2↑X) equal to ( 2↑4) =2 x 2 x 2 x 2 = 16 and so on until it reaches 63.
Now what we have to figure out now is how big was that checkerboard ? Where did she/he got all those pennies ?, and which banks went along with her/him ? ; And once all the pennies were placed did the checkerboard fall through the floor? (end)
No comments:
Post a Comment