We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8311a0e commit 0d8b32dCopy full SHA for 0d8b32d
Pattern-2/Parallelogram_Pattern.java
@@ -0,0 +1,33 @@
1
+/*
2
+Write a program to print parallelogram pattern for the given N number of rows.
3
+For N = 4
4
+****
5
+ ****
6
7
8
+*/
9
+
10
+import java.util.*;
11
12
+public class Parallelogram_Pattern {
13
+ public static void main(String[] args) {
14
+ // Write your code here
15
+ Scanner sc = new Scanner(System.in);
16
+ int row = sc.nextInt();
17
18
+ for (int i = 1; i <= row; i++)
19
+ {
20
+ for (int j = 2; j <= i; j++)
21
22
+ System.out.print(" ");
23
+ }
24
+ for (int j = 1; j <= row; j++)
25
26
+ System.out.print("*");
27
28
+ System.out.println();
29
30
31
32
33
+}
0 commit comments