I am using C as my programming language and following are the code for the same and i am not able to understand that if I posted up my grid line before everything worked, and the line after that bug. There's no reason
Code:
printGrill(grill); / / then it works
if(grill[cell][3]==1) / / then it works more
Code:
void printGrill(int grill[][13])
{
int i, j, k;
printf("-------------------------------------\n" );
k=0;
for(i=0;i<9;i++)
{
for(j=0;j<9;j++)
{
switch(grill[k][3])
{
case 0 : printf("| 0 " ); break;
case 1 : printf("| %d ", grill[k][4]); break;
}
k++;
}
printf("|\n-------------------------------------\n" );
}
printf("\n\n\n" );
}
Bookmarks