#define boyut 24
void rasgele_matris(int dizi[][boyut])
{
srand(time(NULL)); //sistem satine göre random sayı üretecek.
int i, j;
for (i = 0; i < boyut; i++)
for (j = 0; j < boyut; j++)
{
int rasgele = rand() % 2;
dizi[i][j] = rasgele;
}
}
I want to count neighbour in my matrix. for example for dizi[2][2] indis neighbours [1][1] , [1][2] , [1][3] , [2][1] , [2][3], [3][1], [3][2], [3][3] need all neighbour indis value to sum . How to do this?