记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:6:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
  scanf("%d",&x1);
  ^~~~~
/in/foo.c:7:14: error: 'x2' undeclared (first use in this function)
  scanf("%d",&x2);
              ^~
/in/foo.c:7:14: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:10:7: error: stray '\357' in program
  if(x1>x2)  i1 = x2;
       ^
/in/foo.c:10:8: error: stray '\274' in program
  if(x1>x2)  i1 = x2;
        ^
/in/foo.c:10:9: error: stray '\236' in program
  if(x1>x2)  i1 = x2;
         ^
/in/foo.c:10:10: error: expected ')' before 'x2'
  if(x1>x2)  i1 = x2;
          ^~
/in/foo.c:12:2: warning: statement with no effect [-Wunused-value]
  for (i1; i1 > 0; i1-- )
  ^~~
/in/foo.c:12:14: error: stray '\357' in program
  for (i1; i1 > 0; i1-- )
              ^
/in/foo.c:12:15: error: stray '\274' in program
  for (i1; i1 > 0; i1-- )
               ^
/in/foo.c:12:16: error: stray '\236' in program
  for (i1; i1 > 0; i1-- )
                ^
/in/foo.c:12:18: error: expected ';' before numeric constant
  for (i1; i1 > 0; i1-- )
                  ^
/in/foo.c:16:2: error: expected ';' before '}' token
  }
  ^
/in/foo.c:17:10: error: stray '\357' in program
   if (x1 > x2)   i2= x1;
          ^
/in/foo.c:17:11: error: stray '\274' in program
   if (x1 > x2)   i2= x1;
           ^
/in/foo.c:17:12: error: stray '\236' in program
   if (x1 > x2)   i2= x1;
            ^
/in/foo.c:17:14: error: expected ')' before 'x2'
   if (x1 > x2)   i2= x1;
              ^~
/in/foo.c:19:3: error: expected ';' before 'for'
   for (i2; i2 <=x1*x2;i2++)
   ^~~
/in/foo.c:19:15: error: stray '\357' in program
   for (i2; i2 <=x1*x2;i2++)
               ^
/in/foo.c:19:16: error: stray '\274' in program
   for (i2; i2 <=x1*x2;i2++)
                ^
/in/foo.c:19:17: error: stray '\234' in program
   for (i2; i2 <=x1*x2;i2++)
                 ^
/in/foo.c:27:1: error: expected ';' before '}' token
 }
 ^
/in/foo.c:8:9: warning: variable 'i2' set but not used [-Wunused-but-set-variable]
  int i1,i2;
         ^~

信息

递交者
类型
自测
题目
P1079 xf1-2最大公倍数与最小公因数
语言
C
递交时间
2019-08-15 08:59:05
评测时间
2019-08-15 08:59:05
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes