how i will display both rows on screen? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 2

how i will display both rows on screen?

int x[2][3] = { {2, 3, 4}, // 1st row {8, 9, 10} // 2nd row };

24th Dec 2016, 10:33 AM
Aqib Asmat
Aqib Asmat - avatar
1 Antwort
+ 6
You may use loops of your preference. The following is an example that you may want to refer to: int i = 0; int j = 0; for (i = 0; i <= 1; i++) { for (j= 0; j <= 2; j++) { cout << array[i][j]; } cout << endl; }
24th Dec 2016, 11:25 AM
Hatsy Rei
Hatsy Rei - avatar