public class LoopExample
{
public static void main(String[] args)
{
int i,j;
for(i=4;i>=0;i--)
{
for(j=0;j<=i;j++)
System.out.print("*");
System.out.println("");
}
}
}
D:\>javac LoopExample.java
D:\>java LoopExample
*****
****
***
**
*
D:\>
原文链接:https://www.f2er.com/javaschema/285731.html