if(myArray[0][0] != 0 &&
myArray[0][1] != 0&&
myArray[0][2] != 0&&
myArray[0][3] != 0&&
myArray[0][4] != 0&&
myArray[1][0] != 0&&
myArray[1][1] != 0&&
myArray[1][2] != 0&&
myArray[1][3] != 0&&
myArray[1][4] != 0&&
myArray[2][0] != 0&&
myArray[2][1] != 0&&
myArray[2][2] != 0&&
myArray[2][3] != 0&&
myArray[2][4] != 0&&
myArray[3][0] != 0&&
myArray[3][1] != 0&&
myArray[3][2] != 0&&
myArray[3][3] != 0&&
myArray[3][4] != 0&&
myArray[4][0] != 0&&
myArray[4][1] != 0&&
myArray[4][2] != 0&&
myArray[4][3] != 0&&
myArray[4][4] != 0)
做了一个二维数组,要在里面填数, 当数组被填满的时候 就显示GG
虽然这样可以运行,求大神教有什么办法简写条件吗?
myArray[0][1] != 0&&
myArray[0][2] != 0&&
myArray[0][3] != 0&&
myArray[0][4] != 0&&
myArray[1][0] != 0&&
myArray[1][1] != 0&&
myArray[1][2] != 0&&
myArray[1][3] != 0&&
myArray[1][4] != 0&&
myArray[2][0] != 0&&
myArray[2][1] != 0&&
myArray[2][2] != 0&&
myArray[2][3] != 0&&
myArray[2][4] != 0&&
myArray[3][0] != 0&&
myArray[3][1] != 0&&
myArray[3][2] != 0&&
myArray[3][3] != 0&&
myArray[3][4] != 0&&
myArray[4][0] != 0&&
myArray[4][1] != 0&&
myArray[4][2] != 0&&
myArray[4][3] != 0&&
myArray[4][4] != 0)
做了一个二维数组,要在里面填数, 当数组被填满的时候 就显示GG
虽然这样可以运行,求大神教有什么办法简写条件吗?