C++ | Multi-Dimensional Arrays, and printing them

/ 26 Sept 2013 /
This is pretttty cool, think of all the possibilities :')



#include <iostream>
#include <ctime>
using namespace std;

int main() 
{
  int sally[2][3] = {{2, 3, 4}, {8, 9, 10}};
  
  for(int row = 0; row < 2;row++){
   for(int col = 0; col < 3; col++) {
    cout << sally[row][col] << " ";
   }
   cout << endl;
  }
  
}
 
Copyright © 2010 M(ath)+me, All rights reserved