java 打印个三角形
public class ImoocStudent {
public static void main(String[] args) throws Exception{
int line = 9;
for(int i = 1; i <= line;i++){
for(int k = 0;k < line - i;k++){
System.out.print(" ");
}
for(int j = 1;j <= i;j++){
System.out.print("* ");
}
System.out.println();
}
}
}

相信坚持的力量,日复一日的习惯.

浙公网安备 33010602011771号