We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0c93ed commit ab89543Copy full SHA for ab89543
Halfpyramid.java
@@ -0,0 +1,16 @@
1
+import java.util.Scanner;
2
+class Main {
3
+
4
+ public static void main(String[] args)
5
+ {
6
+ Scanner s=new Scanner(System.in);
7
+ System.out.print("ENTER THE NO OF ROWS:");
8
+ int rows =s.nextInt();
9
+ for (int i = 1; i <= rows; i++) {
10
+ for (int j = 1; j <= i; j++) {
11
+ System.out.print("* ");
12
+ }
13
+ System.out.println();
14
15
16
+}
0 commit comments