TwoD - for (int i=0; i<4; ++ i) { for (int j=0;...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
// Basic 2D arrays // Authors: Charles Swanson, Eric Van Wyk #include <iostream> using namespace std ; int main() { int a[4][3] = { 7, 8, 2, 4, 9, 1, 0, 3, 3, 1, 0, 4 } ; // The meaning doesn't change if these are written in one long row.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: for (int i=0; i&lt;4; ++ i) { for (int j=0; j&lt;3; ++j) { cout &lt;&lt; a[i][j] &lt;&lt; &quot; &quot; ; } cout &lt;&lt; endl ; } }...
View Full Document

Ask a homework question - tutors are online