记录详情

Compile Error

foo.c: In function ‘main’:
foo.c:6:15: warning: missing terminating " character
    6 |         scanf("%d%d,&a,&b);
      |               ^
foo.c:6:15: error: missing terminating " character
    6 |         scanf("%d%d,&a,&b);
      |               ^~~~~~~~~~~~~
foo.c:8:12: error: expected ‘)’ before ‘;’ token
    8 |     sum=a+b;
      |            ^
      |            )
foo.c:6:14: note: to match this ‘(’
    6 |         scanf("%d%d,&a,&b);
      |              ^
foo.c:10:22: error: stray ‘\’ in program
   10 |         printf(sum=%d\n",sum);
      |                      ^
foo.c:10:24: warning: missing terminating " character
   10 |         printf(sum=%d\n",sum);
      |                        ^
foo.c:10:24: error: missing terminating " character
   10 |         printf(sum=%d\n",sum);
      |                        ^~~~~~~
foo.c:8:8: warning: passing argument 1 of ‘scanf’ makes pointer from integer without a cast [-Wint-conversion]
    8 |     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:12:1: error: expected declaration or statement at end of input
   12 | }
      | ^

信息

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