public class Test {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
System.out.println("请输入一个整数:");
int num = sc.nextInt();
for(int i = num; i > 0; i--){
for(int j = num; j > num -i; j --){
System.out.print(j);
}
System.out.println();
}
}
} |