日期:2014-05-20 浏览次数:20711 次
class Text{ public static void main (String args[]) { int m = 100 ; for (int n = 1; n <=m ; n++) { System.out.print(n + ","); if((n+1)\10 == 0){ System.out.println(); } } } }
------解决方案--------------------
Sorry,取余符号写错了
class Text{ public static void main (String args[]) { int m = 100 ; for (int n = 1; n <=m ; n++) { System.out.print(n + ","); if((n+1)%10 == 0){ System.out.println(); } } } }