Write a program in java to display the following program :-
* * * *
* * *
* *
*
Attachments:
Answers
Answered by
2
public class Main {
public static void main(String[] args) {
for(int i = 1; i <= 4; i++) {
for(int j = 4; j >= i; j--)
System.out.print("* ");
System.out.println();
}
}
}
// Notice "print" and "println" both are used.
Attachments:
Similar questions