pyrimid

please any body tell me how i can make a pyramid with Star in nested loop?
The way I would do this is to create a 2D char array.
I would then draw each of the component figures into the array, then print the array.

You don't mention the type of star. A 6 pointed star is just two triangles (one inverted) and your pryamid is of course also a triangle. You should be able to make one function that draws a triangle of a specified size at a specific position in the grid.

You can do this without the 2D array, but that assumes you have the ability to position on the screen (not a feature of standard C++).

Topic archived. No new replies allowed.