记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:8:15: error: expected primary-expression before '%' token
    8 | scanf("%d %d",%x1,%x2);
      |               ^
foo.cc:8:19: error: expected primary-expression before '%' token
    8 | scanf("%d %d",%x1,%x2);
      |                   ^
foo.cc:16:12: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   16 | printf(  x1+x2 );
      |          ~~^~~
      |            |
      |            int
In file included from foo.cc:1:
/nix/store/1x86jfiwsp5qi448fcdkkzn7vmx4krv2-glibc-2.35-163-dev/include/stdio.h:356:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  356 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
foo.cc:16:18: error: expected '}' at end of input
   16 | printf(  x1+x2 );
      |                  ^
foo.cc:9:9: note: to match this '{'
    9 | while(1){
      |         ^
foo.cc:16:18: error: expected '}' at end of input
   16 | printf(  x1+x2 );
      |                  ^
foo.cc:4:1: note: to match this '{'
    4 | {
      | ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1079 xf1-2最大公倍数与最小公因数
比赛
2022年迎新赛(第二场)
语言
C++
递交时间
2022-08-27 14:20:23
评测时间
2022-08-27 14:20:23
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes