+ 1
How to print pattern like this in java
***** **** *** ** *
3 Answers
+ 3
https://code.sololearn.com/coQFY481yW5B/?ref=app
+ 3
public class Program
{
public static void main(String[] args) {
for(int i = 0; i < 5; ++i) {
for(int j = 0; j < 5 - i; ++j) {
System.out.print("*");
}
System.out.println();
}
}
}