#include <iostream>
using namespace std;
int main() {
// DeklariĊĦemo dvodimenzionalni niz sa 3 reda i 4 kolone
int matrix[3][4] = {
{1, 2, 3, 4},
{5, 6, 7, 8},
{9, 10, 11, 12}
};
// Ispisujemo elemente matrice
cout << "Matrica izgleda ovako:" << endl;
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 4; j++) {
cout << matrix[i][j] << " ";
}
cout << endl; // Novi red posle svakog reda matrice
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CiAgICAvLyBEZWtsYXJpxaFlbW8gZHZvZGltZW56aW9uYWxuaSBuaXogc2EgMyByZWRhIGkgNCBrb2xvbmUKICAgIGludCBtYXRyaXhbM11bNF0gPSB7CiAgICAgICAgezEsIDIsIDMsIDR9LAogICAgICAgIHs1LCA2LCA3LCA4fSwKICAgICAgICB7OSwgMTAsIDExLCAxMn0KICAgIH07CgogICAgLy8gSXNwaXN1amVtbyBlbGVtZW50ZSBtYXRyaWNlCiAgICBjb3V0IDw8ICJNYXRyaWNhIGl6Z2xlZGEgb3Zha286IiA8PCBlbmRsOwogICAgZm9yIChpbnQgaSA9IDA7IGkgPCAzOyBpKyspIHsKICAgICAgICBmb3IgKGludCBqID0gMDsgaiA8IDQ7IGorKykgewogICAgICAgICAgICBjb3V0IDw8IG1hdHJpeFtpXVtqXSA8PCAiICI7CiAgICAgICAgfQogICAgICAgIGNvdXQgPDwgZW5kbDsgIC8vIE5vdmkgcmVkIHBvc2xlIHN2YWtvZyByZWRhIG1hdHJpY2UKICAgIH0KCiAgICByZXR1cm4gMDsKfQo=