输出九九乘法表 代码实现: class Demo_ChengFa99 { public static void main(String[] args) { for (int x = 1;x < 10;x++ ) { for (int y = 1;y <= x ;y++) { int num = 0; num = y * x; System.out.print(y + "*" + x + "=" + num); System.out.print('\t'); } System.out.println(); } } }
|