[ create a new paste ] login | about

Link: http://codepad.org/N36RKzuP    [ raw code | output | fork ]

C++, pasted on Jun 22:
#include <iostream>

int main(){

	const int row = 3, col = 2;

	int arr[row][col] = 
	{
		{1, 2},
		{3, 4},
		{5, 6}
	};

	for(int i = 0; i < row; ++i)
	{
		std::cout << "[ ";

		for(int j = 0; j < col; ++j)
			std::cout << arr[i][j] << ' ';

		std::cout << ']' << std::endl;
	}

	return 0;
}


Output:
1
2
3
[ 1 2 ]
[ 3 4 ]
[ 5 6 ]


Create a new paste based on this one


Comments: