1 2 3 4

C语言之多维数组

#include <stdio.h>
#include <stdlib.h>


int main()
{

int add[2][3][4] = { {{1,2,3,4},{5,6,7,8},{9,10,11,12}}, {{13,14,15,16},{17,18,19,20},{21,22,23,24}} };


for (int x = 0; x < 2; x++) {
for (int i = 0; i < 3; i++) {
for(int h=0;h<4;h++)
printf(" %d", add[x][i][h]);
}
printf("\n");
}




system("pause");
return 0;
}

posted on 2020-12-10 22:08  三日坊主i  阅读(134)  评论(0)    收藏  举报

导航