package practiceGO;
/*
* *
* **
* ***
* ****
* *****
*
*/
public class Cto {
public static void main(String[] args) {
for(int i=4; i>=0; i--){
for(int j=1; j<=5; j++){
if ((i-j)>=0) {
System.out.print(" ");
}else{
System.out.print("*");
}
}
System.out.println();
}
}
}运行结果:
* ** *** **** *****
原文地址:http://11317783.blog.51cto.com/11307783/1769220