5、利用for循环打印 9*9 乘法表。
public class Test {// 定义类
public static void main(String[] args) {// 主函数,程序的入口
for(int i=1;i<=9;i++){
for(int j=1;j<i+1;j++){
System.out.print(j+"*"+i+"="+j*i+" ");
}
System.out.println();
}
}
}

浙公网安备 33010602011771号