public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner input=new Scanner(System.in);
System.out.println("请输入三角形行数:");
int hang=input.nextInt();
for(int i=0;i
for(int j=0;j<=i;j++){
System.out.print(j+1);
}
System.out.println();
}
}
int len = 5;
for(int i = 0; i< len; i++){
for(int k = 1; k<=(i+1); k++){
system.out.printf("%d", k);
}
system.out.println();
}