/ Vijos /

记录详情

Compile Error

foo.c: In function 'main':
foo.c:19:28: error: 'n' undeclared (first use in this function)
   19 |         for(int i = 0; i < n; i++){
      |                            ^
foo.c:19:28: note: each undeclared identifier is reported only once for each function it appears in
foo.c:20:25: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[20]' [-Wformat=]
   20 |                 scanf("%s %d %d %c %c %d", &name, &grade1, &grade2, &carder, &western, &paper);
      |                        ~^                  ~~~~~
      |                         |                  |
      |                         char *             char (*)[20]
foo.c:20:34: warning: format '%c' expects argument of type 'char *', but argument 5 has type 'char (*)[1]' [-Wformat=]
   20 |                 scanf("%s %d %d %c %c %d", &name, &grade1, &grade2, &carder, &western, &paper);
      |                                 ~^                                  ~~~~~~~
      |                                  |                                  |
      |                                  char *                             char (*)[1]
foo.c:20:37: warning: format '%c' expects argument of type 'char *', but argument 6 has type 'char (*)[1]' [-Wformat=]
   20 |                 scanf("%s %d %d %c %c %d", &name, &grade1, &grade2, &carder, &western, &paper);
      |                                    ~^                                        ~~~~~~~~
      |                                     |                                        |
      |                                     char *                                   char (*)[1]
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1001 谁拿了最多奖学金
语言
C
递交时间
2022-09-26 10:52:20
评测时间
2022-09-26 10:52:20
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes