/* Programmieren fuer Physiker: C++, SS10 array.cc Definiere 4x3-Matrix und gebe sie aus. */ #include using namespace std; int main() { // int mat[4][3] = {1,2,3,4,5,6,7,8,9,10,11,12}; //Alternativ: int mat[4][3] = { {1,2,3}, {4,5,6}, {7,8,9}, {10,11,12} }; int i,j; for(i=0;i<=3;i++) { for(j=0;j<=2;j++) cout << mat[i][j] << " "; cout << endl; } }