求解char型二维数组内部符号替换的问题
char a[7][6] ={
{ '~','~','~','~','~','~' },
{ '~','~','~','~','~','~' },
{ '~','~','~','~','~','~' },
{ '~','~','~','~','~','~' },
{ '~','~','~','~','~','~' },
{ '~','~','~','~','~','~' },
{ '~','~','~','~','~','~' }
};
char W = '●', B = '¤';
int i, j;
printf(" 1 2 3 4 5 6 7 \n");
for (i = 0; i < 6; i++)
{
for (j = 0; j < 7; j++)
printf("%4c ", a[j][i]);
printf("\n");
}
想通过判断选择行后用'●'or'¤'去替换相应位置最下面的'~',应该怎么替换呢?