April 2, 2025 Menu


This is another simple application in Java that uses for loops in creating asterisk patterns.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
public class PatternTwo {

    public static void main(String[] args) {

        for (int j = 5; j > 0; j--) {

   System.out.println("");

            for (int i = 5; i >= j; i--) {
                System.out.print(" ");
  
            }
for (int q = 0; q < j; q++) {
                System.out.print("*");
            }
        }
        System.out.println("");
    }
}

Mag-post ng isang Komento

Emoticon
:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

 
Top