Will make a pyramid of some kind out of a number
Hi, I need to do a program where the user needs to imput a number of lines between 1 and 8 and then the program will make a pyramid of some kind out of a number that is 2^x (1-2-4-8-16 etc). I can calculate and have the numbers but I have no freaking idea how to put them like in the following exemple in the image.
Number of lines = 4. There's supposed to be 4 space between each column.
I have to do it with "for" loops. Anyone have any idea?
1 2 1
1 2 4 2 1
1 2 4 8 4 2 1