今天接触2维数组![求助]
#include "stdio.h"int main (void)
{
char a[10][10], b, c;
for (b = 0;b <= 9;b++)
{
for (c = 0;c <= 9;c++)
{
scanf ("%c\n",&a[b][c]);
}
}
for (b = 0;b <= 9;b++)
{
for (c = 0;c <= 9;c++)
{
if (b = c)
{
printf (" ");
}
else
{
printf ("*\n",a[b][c]);
}
}
}
return 0;
}
要显示10行10列的* ,当行编号=列编号时 输出空格!
上面是我写的, 但运行了不是的!