4 喜歡 0 不喜歡
3.3k 瀏覽

古書上有記載:『九宮之義,法之靈龜。二四為肩,六八為足,左七右三,載九履一,五居中央。』

其實他是在說一個3X3的魔方陣,就像下面這個一樣。

魔方陣神奇的地方就在於不管是直的、橫的還是對角線,他的和都是一樣。用一個固定的規則把數字填入奇數大小的方陣中,就會產一個魔方陣,其規則如下。

 

照這樣的規則把數字填入5X5的方陣中就會產生以下的魔方陣。

請寫一個程式,輸入一個奇數代表方陣的大小,請依照給予的規則把數字填進去。

 

輸入說明:

會輸入一個正奇數,代表方陣的大小。

 

輸出說明:

請輸出整個魔方陣

輸入範例:

5

 

輸出範例:

17 24 1 8 15

23 5 7 14 16

4 6 13 20 22

10 12 19 21 3

11 18 25 2 9

[考試] 最新提問 分類:2017-1 程式設計(一)AD | 用戶: (18k 分)
ID: 36174 - 從幾時開始: 2017-12-08 18:30 - 到幾時結束: 2017-12-08 21:00
| 3.3k 瀏覽

5 個回答

0 喜歡 0 不喜歡
內容已隱藏
#include<stdio.h>
int main()
{
 int i,j,k;
 int x=0,y=0,z=0;
* **** ** * *** * * * * *** * * *
*** * *** * * ** ** ** *
 int arr[j][k];
 j=i;
 k=i;
** * **
 for(k=0;k<i;k++)



** ***** ** ** ** * * *****
* * * ** * * * * * ***
* * * ** ****** ** ** * * * * ** * ** **** ***
* ****** * * ** ****** *** * **** *
* * * ***** ***** ** *

* ** ** **** **** *** *** ** * * **
**** **** ** *** ** *
****** * * **** * * ****** ***** * *
*** **** ** * ** ** * * * ****
* * *** * * **

* * * *** * * * **** * ** ** **** *** * * ** *
* **** ** ** ******** ** * ***

* * ** * * *** ** ** * * * * * *
* *** ***** ** ** * ** ** * *** * * *** * * * **





** * ** ** ***** **
return 0;

}
最新回答 用戶: (236 分)
0 0
prog.c: In function 'main':
prog.c:18:12: error: expected expression before 'for'
      while(for(j=0;j<i;j++));
            ^~~
prog.c:19:9: error: 'a' undeclared (first use in this function)
      x+=a[j][k];
         ^
prog.c:19:9: note: each undeclared identifier is reported only once for each function it appears in
prog.c:24:12: error: expected expression before 'for'
      while(for(k=0;k<i;k++));
            ^~~
prog.c:38:1: warning: implicit declaration of function 'system' [-Wimplicit-function-declaration]
 system("pause");
 ^~~~~~
0 喜歡 0 不喜歡
內容已隱藏
#include<stdio.h>

void c(int num,int i,int j,int n,int *a)
{
    a[i*n+j]=num;
    if(i==0)
** ** * ** * ***** ****** * *** * * ** ** ** **
    else
******* * * *** ** * * * ** ** ** *
    if(j==n-1)
** ** ** *** * * * **** * ** * ** ***** * *
    else
***** * * * * * * * * *** * *** * * * *** *
* * * **** ****** * ** ******* *
**** *********** * * * *** ** *** * * * * ** ***
    else
    {
***** * * ***** * **** ** ** * * * ** * * * *
*** * *** **** * * * * * *** *** ** *** * * ** * * * ****
* *** ** * * **** * **** * *** ** * **** *
* * * ** *** * ** * ** **** ** * *** * ** * *** *** * **** ***
**** * * * *** * ** ** * **** * * ** * *** **
* * *** * * * *** * * * * * *** ** ** * ** * * * * ***
** ** * * * * ** * **** ** ** ** * *** * * **
** * **** * ***** * ** * * * * *** ***** ** * * *
* * * * * * * ** ** ***** ***** ** **** * *
* * **** * * * * ** ** * ** * * *** * *** **
    }
}

int main()
{
    int n,z,y;
** * **** **** * *** * * * * ***** * * * *
    {
** * ** * ** ** **** ***** **** * * a[n][n],i,j;
** * * * * * * *** ***** ** ** * * ** ** * ** ** * *
* ***** * **** *** ** * * * ***** ** **** * *** * * * ** ** * * * * * *****
** * * **** ** ** ** * ** ** ** * * * * ** ** ** ***** ** ** * * * * * * ***
**** *** * ** ** ** * **** * * *** * * *** *
* * * ** **** *** ** * * ** **** * ** *** ***** ** *** * * * *
* * ** * **** * * * ***** * ** ** ** * * *
* ** * * * ** ****** * ** * * ** **** * ** ** * ** ** **** ** *
* * ** *** * * ** * * * * ** * * * * * * * * * *** * * ** * * * ",a[z][y]);
* **** * * *** * **** **** * *** * * ** * * ** * * * ** **** *** ***
***** ** * ******** * * ** * * ** * * * * **
    }
    return 0;
}
最新回答 用戶: (30k 分)
修改於 用戶:
0 0
prog.c: In function 'main':
prog.c:56:21: warning: passing argument 5 of 'c' from incompatible pointer type [-Wincompatible-pointer-types]
         c(1,0,n/2,n,a);
                     ^
prog.c:3:6: note: expected 'int *' but argument is of type 'int (*)[(sizetype)(n)]'
 void c(int num,int i,int j,int n,int *a)
      ^
0 0
prog.c: In function 'main':
prog.c:40:21: warning: passing argument 5 of 'c' from incompatible pointer type [-Wincompatible-pointer-types]
         c(1,0,n/2,n,a);
                     ^
prog.c:3:6: note: expected 'int *' but argument is of type 'int (*)[(sizetype)(n)]'
 void c(int num,int i,int j,int n,int *a)
      ^
0 0
prog.c: In function 'c':
prog.c:15:23: warning: passing argument 5 of 'c' makes pointer from integer without a cast [-Wint-conversion]
         c(num+1,i,j,n,a[0]);
                       ^
prog.c:3:6: note: expected 'int *' but argument is of type 'int'
 void c(int num,int i,int j,int n,int *a)
      ^
prog.c:27:25: warning: passing argument 5 of 'c' makes pointer from integer without a cast [-Wint-conversion]
         c(num+1,i+1,j,n,a[0]);
                         ^
prog.c:3:6: note: expected 'int *' but argument is of type 'int'
 void c(int num,int i,int j,int n,int *a)
      ^
0 0
Case 0: Correct output
Case 1: Correct output
0 喜歡 0 不喜歡
內容已隱藏
* * ** ** ****
int main ()
{
* *** ** * *** * * * * ** a;
** ** ** ** * * ** * * * * ** *** *** * **

* ** *** ** ** * * * * 0;
}
最新回答 用戶: (215 分)
修改於 用戶:
0 0
Case 0: Wrong output
Case 1: Wrong output
0 0
-----------Re-judge-----------
Case 0: Wrong output
Case 1: Wrong output
0 0
Case 0: Wrong output
Case 1: Wrong output
0 0
Case 0: Wrong output
Case 1: Wrong output
0 0
Case 0: Wrong output
Case 1: Wrong output
0 0
Case 0: Wrong output
Case 1: Wrong output
0 0
Case 0: Wrong output
Case 1: Wrong output
0 0
prog.c: In function 'main':
prog.c:7:5: error: expected ';' before 'return'
     return 0;
     ^~~~~~
0 喜歡 0 不喜歡
內容已隱藏
#include<stdio.h>
#include<stdlib.h>

void Magic(int n){
**** * * * ** *** * x[17*17]={0},s=n*n,p=n>>1,q,i;
* * ** * * * * * ** *** ** * * * * ** * * ***** **
** * * *** * ** ** * ** *
* * ** ** ** ** * * ** **** **** **** ****
* * *** ** * ** *** * * **** ****** *** * * ** * * * * ****** *
***** *** * **** * * * ******** * ** *
     }
     
     int main(){
**** * * ****** * * * * * * * * * ** * *** * *** * *** ** * ** ** * ** ** *** *** *
** * ** ** * *** ****** *** * * ** **** ** * * *** * **** * * ***** * ***********
***** * *** ** * *** * * * * ** ** *** * * **** ******* * ** *** * **** ** ******
** *** * ***** ** ** * ** * * ** ***** ** *** ** * * **** * ** ** * * * * * ** *** * **
*** ****** ** **** ** ** ***** * * * * * * ** * ** ** ****** * ** * * * *** ** *

** *** ** * * * ** * * *** * * *** ** *** ** *** * *** ** * *
電機一 410623057林献騰
最新回答 用戶: (150 分)
0 0
prog.c: In function 'Magic':
prog.c:9:40: error: expected ')' before '}' token
      printf("%3d%c",x[i],"\n"[i%n==n-1]};
                                        ^
prog.c:9:40: error: expected ';' before '}' token
prog.c: At top level:
prog.c:10:13: warning: missing terminating " character
      printf("\n);
             ^
prog.c:10:13: error: missing terminating " character
      printf("\n);
             ^~~~~
prog.c:11:6: error: expected declaration specifiers or '...' before '}' token
      }
      ^
prog.c:11:6: error: expected ';', ',' or ')' before '}' token
prog.c:21:1: error: stray '\351' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
 ^
prog.c:21:2: error: stray '\233' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
  ^
prog.c:21:3: error: stray '\273' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
   ^
prog.c:21:4: error: stray '\346' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
    ^
prog.c:21:5: error: stray '\251' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
     ^
prog.c:21:6: error: stray '\237' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
      ^
prog.c:21:7: error: stray '\344' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
       ^
prog.c:21:8: error: stray '\270' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
        ^
prog.c:21:9: error: stray '\200' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
         ^
prog.c:21:11: error: expected identifier or '(' before numeric constant
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
           ^~~~~~~~~
prog.c:21:20: error: stray '\346' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                    ^
prog.c:21:21: error: stray '\236' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                     ^
prog.c:21:22: error: stray '\227' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                      ^
prog.c:21:23: error: stray '\347' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                       ^
prog.c:21:24: error: stray '\214' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                        ^
prog.c:21:25: error: stray '\256' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                         ^
prog.c:21:26: error: stray '\351' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                          ^
prog.c:21:27: error: stray '\250' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                           ^
prog.c:21:28: error: stray '\260' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                            ^
0 0
prog.c: In function 'Magic':
prog.c:9:40: error: expected ')' before '}' token
      printf("%3d%c",x[i],"\n"[i%n==n-1]};
                                        ^
prog.c:9:40: error: expected ';' before '}' token
prog.c: At top level:
prog.c:10:13: warning: missing terminating " character
      printf("\n);
             ^
prog.c:10:13: error: missing terminating " character
      printf("\n);
             ^~~~~
prog.c:11:6: error: expected declaration specifiers or '...' before '}' token
      }
      ^
prog.c:11:6: error: expected ';', ',' or ')' before '}' token
prog.c:21:1: error: stray '\351' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
 ^
prog.c:21:2: error: stray '\233' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
  ^
prog.c:21:3: error: stray '\273' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
   ^
prog.c:21:4: error: stray '\346' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
    ^
prog.c:21:5: error: stray '\251' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
     ^
prog.c:21:6: error: stray '\237' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
      ^
prog.c:21:7: error: stray '\344' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
       ^
prog.c:21:8: error: stray '\270' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
        ^
prog.c:21:9: error: stray '\200' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
         ^
prog.c:21:11: error: expected identifier or '(' before numeric constant
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
           ^~~~~~~~~
prog.c:21:20: error: stray '\346' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                    ^
prog.c:21:21: error: stray '\236' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                     ^
prog.c:21:22: error: stray '\227' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                      ^
prog.c:21:23: error: stray '\347' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                       ^
prog.c:21:24: error: stray '\214' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                        ^
prog.c:21:25: error: stray '\256' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                         ^
prog.c:21:26: error: stray '\351' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                          ^
prog.c:21:27: error: stray '\250' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                           ^
prog.c:21:28: error: stray '\260' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                            ^
0 0
prog.c: In function 'Magic':
prog.c:9:40: error: expected ')' before '}' token
      printf("%3d%c",x[i],"\n"[i%n==n-1]};
                                        ^
prog.c:9:40: error: expected ';' before '}' token
prog.c: At top level:
prog.c:10:13: warning: missing terminating " character
      printf("\n);
             ^
prog.c:10:13: error: missing terminating " character
      printf("\n);
             ^~~~~
prog.c:11:6: error: expected declaration specifiers or '...' before '}' token
      }
      ^
prog.c:11:6: error: expected ';', ',' or ')' before '}' token
prog.c:21:1: error: stray '\351' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
 ^
prog.c:21:2: error: stray '\233' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
  ^
prog.c:21:3: error: stray '\273' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
   ^
prog.c:21:4: error: stray '\346' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
    ^
prog.c:21:5: error: stray '\251' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
     ^
prog.c:21:6: error: stray '\237' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
      ^
prog.c:21:7: error: stray '\344' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
       ^
prog.c:21:8: error: stray '\270' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
        ^
prog.c:21:9: error: stray '\200' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
         ^
prog.c:21:11: error: expected identifier or '(' before numeric constant
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
           ^~~~~~~~~
prog.c:21:20: error: stray '\346' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                    ^
prog.c:21:21: error: stray '\236' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                     ^
prog.c:21:22: error: stray '\227' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                      ^
prog.c:21:23: error: stray '\347' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                       ^
prog.c:21:24: error: stray '\214' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                        ^
prog.c:21:25: error: stray '\256' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                         ^
prog.c:21:26: error: stray '\351' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                          ^
prog.c:21:27: error: stray '\250' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                           ^
prog.c:21:28: error: stray '\260' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                            ^
0 0
prog.c: In function 'Magic':
prog.c:9:40: error: expected ')' before '}' token
      printf("%3d%c",x[i],"\n"[i%n==n-1]};
                                        ^
prog.c:9:40: error: expected ';' before '}' token
prog.c: At top level:
prog.c:10:13: warning: missing terminating " character
      printf("\n);
             ^
prog.c:10:13: error: missing terminating " character
      printf("\n);
             ^~~~~
prog.c:11:6: error: expected declaration specifiers or '...' before '}' token
      }
      ^
prog.c:11:6: error: expected ';', ',' or ')' before '}' token
prog.c:21:1: error: stray '\351' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
 ^
prog.c:21:2: error: stray '\233' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
  ^
prog.c:21:3: error: stray '\273' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
   ^
prog.c:21:4: error: stray '\346' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
    ^
prog.c:21:5: error: stray '\251' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
     ^
prog.c:21:6: error: stray '\237' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
      ^
prog.c:21:7: error: stray '\344' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
       ^
prog.c:21:8: error: stray '\270' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
        ^
prog.c:21:9: error: stray '\200' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
         ^
prog.c:21:11: error: expected identifier or '(' before numeric constant
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
           ^~~~~~~~~
prog.c:21:20: error: stray '\346' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                    ^
prog.c:21:21: error: stray '\236' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                     ^
prog.c:21:22: error: stray '\227' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                      ^
prog.c:21:23: error: stray '\347' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                       ^
prog.c:21:24: error: stray '\214' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                        ^
prog.c:21:25: error: stray '\256' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                         ^
prog.c:21:26: error: stray '\351' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                          ^
prog.c:21:27: error: stray '\250' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                           ^
prog.c:21:28: error: stray '\260' in program
 \xe9\x9b\xbb\xe6\xa9\x9f\xe4\xb8\x80 410623057\xe6\x9e\x97\xe7\x8c\xae\xe9\xa8\xb0
                            ^
0 喜歡 0 不喜歡
內容已隱藏
#include<stdio.h>
#include<stdlib.h>

int main()
{
* *** * * ** * ** map[100][100] = {0};
* * ** * ** *** **** * * n, j, k, l;
* *** * *** ** * **** *** * * ** ** &n);
    k = n / 2;
    j = 0;
    l = 1;
** ** ** * *** * ** = l;
    l ++;
***** * *** * ****** * * <= n * n)
    {
** ***** ** ** * * * ** ** *** * * * * ** * --;
* *** *** * **** * * * * **** * *** *** < 0)
***** ** *** ***** ** * ** ******* * ** ** ** * * *** * * * = n - 1;
* * ** * * * *** ** ** * * * * ++;
* ***** ** * **** ** *** * ** ** * ***** * *** >= n)
** ** ** ****** *** * **** *** ** * ** * *** * * * ** * * = 0;
* *** * * * * ** ***** ** *** **** *** ** ** ** != 0)
**** * * * ** *** ******* ** **** * * * * * *
** * **** * * ** *** ** ****** *** ****** **** ***** *** ****** * ++;
* * * * **** ***** * ****** * * * ** ** * ***** ***** >= n)
****** *** **** ** * ** ** ** ** * * * ** ** *** *** * ***** * * ** * * ** * ** * * = 0;
**** ****** ** * ** * ** **** *** ** * * ********* ** * ** ** ++;
***** * * * * **** ** *** * *** ** * * ** * * * * * **** ** *** >= n)
*** ** *** * * * * * * * * * * *** * ***** * * ** ** ** **** * * * * * = 0;
** * ***** *** *** ** ** ** ** * * ** ****** ** * **** **** ** * ** *** --;
** * ****** ** * *** *** ** ******** * ** ***** * ** * * ****** ** ** < 0)
** **** * **** * ** * *** *** * ** ******* ** * *** * ** * * ***** * * * ** * ** * * * = n - 1;
* ** ** * * ****** ** * * * ** *
* * ** * ** * *** ****** * ** ** *** *** = l;
**** * *** ** ***** ** *** ** ** * * ++;
******* ** *
** * * * ** ** *** ** = 0;j < n;j ++)
    {
** *** * * * * * * * * * * ** ***** *** *** = 0;k < n;k ++)
* * *** * ** ****** * * *** ** * * ** ***** * *** * *** * * * ********** ******* ** ",map[j][k]);
** * **** ** * ** ** * * * **** * ** *** != n - 1)
** *** ** **** * * * * * * * * * ** * ***** * * * * ** * * *** * * * * * **** *
    }
}
最新回答 用戶: (18k 分)
修改於 用戶:
0 0
Case 0: Wrong output
Case 1: Wrong output
0 0
Case 0: Wrong output
Case 1: Wrong output
0 0
-----------Re-judge-----------
Case 0: Wrong output
Case 1: Wrong output
0 0
-----------Re-judge-----------
Case 0: Wrong output
Case 1: Wrong output
0 0
-----------Re-judge-----------
Case 0: Correct output
Case 1: Wrong output
0 0
Case 0: Correct output
Case 1: Wrong output
0 0
-----------Re-judge-----------
Case 0: Correct output
Case 1: Correct output
0 0
-----------Re-judge-----------
Case 0: Correct output
Case 1: Correct output
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.69.7.150
©2016-2025

相關問題

2 喜歡 0 不喜歡
6 回答
[正常] Coding (C) - 最新提問 12月 20, 2017 分類:2017-1 程式設計(一)AD | 用戶: 楊修俊 (30k 分)
ID: 38150 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 3.5k 瀏覽
2 喜歡 0 不喜歡
5 回答
[正常] 開放式問答 - 最新提問 12月 20, 2017 分類:2017-1 程式設計(一)AD | 用戶: 楊修俊 (30k 分)
ID: 38147 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 1.4k 瀏覽
2 喜歡 0 不喜歡
5 回答
[考試] 最新提問 12月 23, 2017 分類:2017-1 程式設計(一)AD | 用戶: 楊修俊 (30k 分)
ID: 38942 - 從幾時開始: 2017-12-23 09:00 - 到幾時結束: 2017-12-23 12:10
| 2.8k 瀏覽
12,783 問題
183,442 回答
172,219 留言
4,824 用戶