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)提供评测服务