请大神看一下这个C语言魔方矩阵哪里错了#includevoid main(){int a[18][18]={0},n,i,j,b=0,c,d,f;printf("please intput the size of it1-----17\n");scanf("%d",&n);if(n%2==0)printf("请输入奇数\n");j=n/2;a[0][j]=1;c=n*n;n-=1;i=0;f=0;for(

来源:学生作业帮助网 编辑:作业帮 时间:2024/12/02 07:34:20
请大神看一下这个C语言魔方矩阵哪里错了#includevoid main(){int a[18][18]={0},n,i,j,b=0,c,d,f;printf(
xJ@_eRҤts1ji uR(XEZz2I|7SSefgf;x[No/GN;˕ukpp^ oݽpc{:r'(+KRЂAlPVGFNJSf2-(dU!b.FD>o]6Q ZWSNϱDR ,F&3+ɨ_s:ngc& tF3rJ>g屪1bKbE#ATbPM@u\ N8pDhW@!5H]؞NF+Ol 12ь"LM1ot`,lG*g`.\mIj&KgDBq"ٴg6uo֝3>wޠux}lǠeh5`z rɍ

请大神看一下这个C语言魔方矩阵哪里错了#includevoid main(){int a[18][18]={0},n,i,j,b=0,c,d,f;printf("please intput the size of it1-----17\n");scanf("%d",&n);if(n%2==0)printf("请输入奇数\n");j=n/2;a[0][j]=1;c=n*n;n-=1;i=0;f=0;for(
请大神看一下这个C语言魔方矩阵哪里错了
#include
void main()
{
int a[18][18]={0},n,i,j,b=0,c,d,f;
printf("please intput the size of it1-----17\n");
scanf("%d",&n);
if(n%2==0)
printf("请输入奇数\n");
j=n/2;
a[0][j]=1;
c=n*n;
n-=1;
i=0;
f=0;
for(b=0;b0)
{ a[0][0]=f+2;i=0;j=0;}
if(i>0&&j==n&&a[i-1][0]==0)
{ a[i-1][0]=f+2;i-=1;j=0;}
else if (a[i-1][0]>0)
{ a[i-1][0]=f+2;i-=1;j=0;}
if(i==0&&j0)
{ a[1][j+1]=f+2;i=1;j+=1;}
if(i>0&&j0)
{ a[i][j+1]=f+2;i=i;j+=1;}
f++;
}
for(b=0;b

请大神看一下这个C语言魔方矩阵哪里错了#includevoid main(){int a[18][18]={0},n,i,j,b=0,c,d,f;printf("please intput the size of it1-----17\n");scanf("%d",&n);if(n%2==0)printf("请输入奇数\n");j=n/2;a[0][j]=1;c=n*n;n-=1;i=0;f=0;for(
我将你的循环改了一下:
for(b=2;b