想問點樣用java整個6*7的array出泥

2008-11-25 6:26 pm
如上面但有條件係所有數1開始要係set做0的..但係跟住要改的

唔該好趕的功課來的

回答 (1)

2008-11-25 7:52 pm
✔ 最佳答案
Here it is:
If you have to modify it, you can do it after modification, for example:
int player1=1, player2=2;
c[0][1]=
int row=6, col=7;
int[][] c=new int[row][col];//using 6 rows & 7 columns
for(int i=0;i<row;i++) for(int j=0;j<col;j++) c[i][j]=0;

If you have to modify it, you can do it after modification, for example:
int player1=1, player2=2;
c[0][1]=player1;
c[0][4]=player2; // an so on.

2008-11-25 11:53:28 補充:
Please delete the 2nd, 3rd and 4th lines in the above post.

2008-11-25 12:07:13 補充:
If you need more details, PM me.


收錄日期: 2021-04-13 16:16:02
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20081125000051KK00316

檢視 Wayback Machine 備份