blob: f147570da263cc8ad5cf3c1817618859ae6cc93c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#include "cell.h"
#include <stdio.h>
void display(struct cell board[9][9])
{
int x;
int y;
int val;
for (y = 0; y < 9; y++)
{
if (y % 3 == 0 && y != 0)
printf("------+------+------\n");
for (x = 0; x < 9; x++)
{
if (x % 3 == 0 && x != 0)
printf("|");
val = board[x][y].val;
printf("%c ", val == 0? ' ' : val+'0');
}
printf("\n");
}
printf("\n");
}
|