一楼n没有定义,我给追加一下
package com.bowen.hh;
import java.util.*;
public class zhengsanjiao{
private static Scanner input = new Scanner(System.in);
public static void main(String[] args){
int n;
System.out.print("\携含nInput n: ");
n=input.nextInt();
for(int i=0;i
for(int k=0;k<辩旅笑n-i-1;k++)
System.out.print(" ");
for(int j=0;j<=i;j++)
System.out.printf("*");
}
}
}
import java.util.*;
public class dispaly{
private static Scanner 脊悄配input = new Scanner(System.in);
public static void 运闭main(String[] args){
System.out.print("\nInput n: ");
n=input.nextInt();
for(int i=0;i樱指 System.out.printf("\n");
for(int k=0;kSystem.out.print(" ");
for(int j=0;j<=i;j++)
System.out.printf("*");
}
}
}