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 ab89543 commit 332aadeCopy full SHA for 332aade
Fullpyramid.java
@@ -0,0 +1,24 @@
1
+import java.util.Scanner;
2
+class Main {
3
+
4
+ public static void main(String[] args)
5
+ {
6
7
+ int rows,k = 0;
8
+ Scanner s=new Scanner(System.in);
9
+ System.out.print("ENTER THE NO OF ROWS:");
10
+ rows =s.nextInt();
11
+ for (int i = 1; i <= rows; i++, k = 0) {
12
+ for (int space = 1; space <= rows - i; space++) {
13
+ System.out.print(" ");
14
+ }
15
16
+ while (k != 2 * i - 1) {
17
+ System.out.print("* ");
18
+ ++k;
19
20
21
+ System.out.println();
22
23
24
+}
0 commit comments