Question: Write a program that prints the pyramid patter shown below. You must use a Nested loop to print the pyramid: 1 2 4 2 1

Write a program that prints the pyramid patter shown below. You must use a Nested loop to print the pyramid: 1 2 4 2 1 1 2 4 8 16 8 4 2 1 1 2 4 8 16 32 64 128 64 32 16 8 4 2 1 1 2 4 8 16 32 16 8 4 2 1 1 2 4 8 16 32 64 32 16 8 4 21 Your program should have the main method call a method named: printpyra that does the printing. Below is a skeleton of what the structure of your program should look like: public class XXXX Programi ( public static void main(Stringl] args) printPyramid); public static void printPyramidO
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
