记录详情

Compile Error

foo.c: In function ‘main’:
foo.c:5:15: warning: missing terminating " character
    5 |         scanf("%d%d, &a, &b);
      |               ^
foo.c:5:15: error: missing terminating " character
    5 |         scanf("%d%d, &a, &b);
      |               ^~~~~~~~~~~~~~~
foo.c:6:26: error: expected ‘)’ before ‘;’ token
    6 |                   sum=a+b;
      |                          ^
      |                          )
foo.c:5:14: note: to match this ‘(’
    5 |         scanf("%d%d, &a, &b);
      |              ^
foo.c:7:32: error: stray ‘\’ in program
    7 |                   printf(sum=%d\n", sum);
      |                                ^
foo.c:7:34: warning: missing terminating " character
    7 |                   printf(sum=%d\n", sum);
      |                                  ^
foo.c:7:34: error: missing terminating " character
    7 |                   printf(sum=%d\n", sum);
      |                                  ^~~~~~~~
foo.c:6:22: warning: passing argument 1 of ‘scanf’ makes pointer from integer without a cast [-Wint-conversion]
    6 |                   sum=a+b;
      |                   ~~~^~~~
      |                      |
      |                      int
In file included from foo.c:1:
/nix/glibc-2.39-52-dev/include/stdio.h:428:42: note: expected ‘const char * restrict’ but argument is of type ‘int’
  428 | extern int scanf (const char *__restrict __format, ...) __wur;
      |                   ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
foo.c:9:34: error: expected declaration or statement at end of input
    9 |                                  }
      |                                  ^

信息

递交者
类型
递交
题目
P1006 A+B Problem
语言
C
递交时间
2024-09-27 21:28:06
评测时间
2024-09-27 21:28:06
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes