记录详情

Compile Error

foo.c: In function 'main':
foo.c:6:15: error: 'true' undeclared (first use in this function)
    6 |         while(true){
      |               ^~~~
foo.c:2:1: note: 'true' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
foo.c:6:15: note: each undeclared identifier is reported only once for each function it appears in
    6 |         while(true){
      |               ^~~~
foo.c:8:17: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
    8 |                 if(r!=0)
      |                 ^~
foo.c:10:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   10 |                         x1=r;
      |                         ^~
foo.c:11:17: error: 'else' without a previous 'if'
   11 |                 else
      |                 ^~~~
foo.c:12:39: error: expected ';' before '}' token
   12 |                         printf("%d",r)
      |                                       ^
      |                                       ;
......
   15 |         }
      |         ~                              
[Hydro](https://hydro.ac)提供评测服务

信息

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