import java.util.Scanner;
class demo41 {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
System.out.println("你好,请输入一个整数1-9之间");
int num=sc.nextInt();
int num=0;
print99(num);
}
public static void print99(int a ){
for (int x=1;x<=a;x++) {
for (int y=1;y<=x;y++) {
System.out.print(y+"*"+x+"="+(y*x)+"\t");
}
System.out.println(" ");
}
} |
|