//E:打印nn乘法表
//public static void print99(int n) {....}
class nn_Method {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("请录入一nn");
int num = sc.nextInt();
printn(num);
public static void printnn(int a) {
for (int i = 1;i <= a ;i++ ) {
for (int j = 1;j <= i ;j++ ) {
System.out.print(j + "*" + i + "=" + (i * j) + "\t" );
}
System.out.println();
}
}
} |
|