#include <iostream>
#include <stdio.h>
#include <Windows.h>
using namespace std;
int main(void){
//使用一个循环给二维数组赋值
int a[3][4];
for (int i=0; i<12; i++){
a[i/4][i%4] = i+1;
}
for(int i=0; i<3; i++){
for(int j=0; j<4; j++){
cout << a[i][j] << " ";
}
cout << endl ;
}
system("pause");
return 0;
}