2d Array Grid display

hi there, i been for trying to create 5x5 grid that

basically display first column, last column , and diagonally (like " N " display). but i cant get it to work.
this is what i have so far.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  int _tmain(int argc, _TCHAR* argv[])
{
	char board[5][5];
	for (int i = 0; i < 5; i++)
	{
		for (int j = 0; j < 5; j++)
		{
			if (i == j){ cout << ' '<<endl; }
			else{ cout << 'N'; }

		}
		
	}
	
	

	return 0;
}
Last edited on
Topic archived. No new replies allowed.