码迷,mamicode.com
首页 > 其他好文 > 详细

每天一篇代码系列(3)

时间:2020-12-02 12:48:38      阅读:18      评论:0      收藏:0      [点我收藏+]

标签:code   public   main   代码   class   ati   pre   oid   bsp   

 1 class O3_1 {
 2   public static void main(String args[ ]) {
 3     int[][] twoD=new int[4][5];
 4     int i,j,k= 0;
 5     for(i=0;i<twoD.length;i++) {
 6       for(j=0;j<twoD[0].length;j++) {
 7         twoD[i][j]=k;
 8         k++;
 9       }
10     }
11     for(i=0;i<twoD.length;i++) {
12       for(j=0;j<twoD[0].length;j++) {
13             System.out.print(twoD[i][j]+" ");
14       }
15       System.out.println();
16     }
17   }
18 }

 

每天一篇代码系列(3)

标签:code   public   main   代码   class   ati   pre   oid   bsp   

原文地址:https://www.cnblogs.com/ljydbk/p/14052218.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!