/*
* * * *
* * *
* *
*
*/
public class TestStar{
public static void main (String args []){
// 定义I=行数,每行打印一个*,打印四行;
for ( int i = 1 ; i < 5 ; i++){
for ( int j = 0; j < 4 - ( 4 - i) ; j ++ ){
System.out.print(" ");
}
for( int k = 0; k < 4 - i ; k++){
System.out.print("* ");
}
//定义K=个数,每行打印四个;
System.out.println("*"); //换行
}
}
}
下载文件地址:
http://yunpan.cn/Qpv8qzNY22hGy
转载于:https://blog.51cto.com/120476536/1357723