From 1acb6a359037bae7106d5f34258f7d6292d14f5b Mon Sep 17 00:00:00 2001 From: Yukta-Jaiswal <64637853+Yukta-Jaiswal@users.noreply.github.com> Date: Thu, 28 Oct 2021 14:39:36 +0530 Subject: [PATCH] Create Aaryan0424.java --- Patterns/Aaryan0424.java | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Patterns/Aaryan0424.java diff --git a/Patterns/Aaryan0424.java b/Patterns/Aaryan0424.java new file mode 100644 index 00000000..6091bbec --- /dev/null +++ b/Patterns/Aaryan0424.java @@ -0,0 +1,27 @@ +public class PyramidPattern +{ +public static void main(String args[]) +{ +//i for rows and j for columns +//row denotes the number of rows you want to print +int i, j, row = 6; +//Outer loop work for rows +for (i=0; i1; j--) +{ +//prints space between two stars +System.out.print(" "); +} +//inner loop for columns +for (j=0; j<=i; j++ ) +{ +//prints star +System.out.print("* "); +} +//throws the cursor in a new line after printing each line +System.out.println(); +} +} +}