📜  C 打印二维数组 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:09.733000             🧑  作者: Mango

代码示例2
#include 

#define MAX 10

int main()
{
    char grid[MAX][MAX];
    int i,j,row,col;

    printf("Please enter your grid size: ");
    scanf("%d %d", &row, &col);


    for (i = 0; i < row; i++) {
        for (j = 0; j < col; j++) {
            grid[i][j] = '.';
            printf("%c ", grid[i][j]);
        }
        printf("\n");
    }

    return 0;
}