Paul_TheLondoner

9 Reputation

2 Badges

18 years, 152 days

MaplePrimes Activity


These are questions asked by Paul_TheLondoner

Hi everyone - I have two problems Im really hoping someone can help me understand how to overcome (I have spent hours and hours going round and round in circles!) Firstly the topic is square pyramid numbers i.e (1), (1+4), (1+4+9), (1+4+9+16), .. etc Im trying to come up with a program that will see a procedure, nPyrLayers(), which says which "layer" of a pyramid a number is.. i.e 5 is the 2nd layer, 14 is the 3rd and then draw a pyramid. I can build the pyramids with blocks (cubes) myself, I can find the nPyrLayers number, but I cant come up with a program that will draw ANY pyramid for any layer USING nPyrLayers... Is there a program I could write that could see "nPyrLayers" and then draw the pyramid with blocks itself?
Page 1 of 1