记录详情

Compile Error

foo.c: In function 'main':
foo.c:8:36: error: expected ';' before '\U0000ff1b'
    8 |         printf("输入x1,x2的数值:");
      |                                    ^~
      |                                    ;
foo.c:11:15: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   11 |         while(tmp=x1%x2);
      |               ^~~
foo.c:11:9: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
   11 |         while(tmp=x1%x2);
      |         ^~~~~
foo.c:12:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
   12 |         {
      |         ^
foo.c:13:22: error: expected ';' before 'x2'
   13 |                 x1=x2
      |                      ^
      |                      ;
   14 |                 x2=tmp
      |                 ~~    
foo.c:17:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   17 |         if(x1<x2);
      |         ^~
foo.c:18:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   18 |         {
      |         ^
foo.c:19:17: error: 'inta' undeclared (first use in this function); did you mean 'int'?
   19 |                 inta=x1;
      |                 ^~~~
      |                 int
foo.c:19:17: note: each undeclared identifier is reported only once for each function it appears in
foo.c:21:20: error: 'a' undeclared (first use in this function)
   21 |                 x2=a;
      |                    ^
foo.c:23:9: error: 'intmax' undeclared (first use in this function)
   23 |         intmax=x2;
      |         ^~~~~~
foo.c:26:9: error: 'max' undeclared (first use in this function)
   26 |         max=x1%x2;
      |         ^~~
foo.c:30:38: warning: implicit declaration of function 'x2x' [-Wimplicit-function-declaration]
   30 |         printf("最小公倍数是%d\n",x1,x2x(x1*x2)/max);
      |                                      ^~~
foo.c:32:17: error: expected ';' before '}' token
   32 |         return 0
      |                 ^
      |                 ;
   33 |                    }
      |                    ~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1079 xf1-2最大公倍数与最小公因数
比赛
2023 程序设计与竞赛(作业1:见面赛)
语言
C
递交时间
2023-09-16 12:51:49
评测时间
2023-09-16 12:51:49
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes