fork download
  1.  
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. const int n=3, m=4;
  9. int i,j;
  10. int X[n][m] =
  11. { 1, 2, 3, 4, 5, 6,
  12. 1, 2, 3, 4, 5, 6 };
  13.  
  14. cout<<"X[3][4]"<<endl;
  15. for (i=0;i<n;i++){cout<<endl;
  16. for (j=0;j<m;j++) cout<<X[i][j]<<" "; }
  17. return 0;
  18. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
X[3][4]

1 2 3 4 
5 6 1 2 
3 4 5 6