Printing a 2D array in C

后端 未结 3 1434
礼貌的吻别
礼貌的吻别 2020-12-15 08:28

how would I print a 2d array in c using scanf for user input, array called grid[ ][ ] and a for loop?

say if the user types in 3 5, the out

3条回答
  •  执笔经年
    2020-12-15 09:05

    First you need to input the two numbers say num_rows and num_columns perhaps using argc and argv then do a for loop to print the dots.

    int j=0;
    int k=0;
    for (k=0;k

    you'd have to replace the dot with something else later.

提交回复
热议问题