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
English,
24 days ago
Chemistry,
24 days ago
Math,
24 days ago
English,
1 month ago
Social Sciences,
9 months ago