public class test {
public static void main(String[] args){
//输出n行的三角形
int n= 25;
for (int j = 0; j < n; j++) {
for (int i = j; i < n; i++) {
System.out.print(" ");
}
for (int i =n- j; i < n; i++) {
System.out.print("*");
}
for (int i = n-j;i<=n;i++){
System.out.print("1");
}
System.out.print("\n");
}
}
}
标签:java,int,打印,System,++,print,三角形
From: https://www.cnblogs.com/exact/p/16791316.html