/ Vijos /

记录详情

Compile Error

foo.c: In function 'find':
foo.c:4:14: error: expected expression before 'int'
    4 |  for(i=2, i<=int(sqrt(x),i++))
      |              ^~~
foo.c:4:30: error: expected expression before ')' token
    4 |  for(i=2, i<=int(sqrt(x),i++))
      |                              ^
foo.c: In function 'main':
foo.c:11:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token
   11 |  for(int i=a,i<=b,i++)
      |               ^~
foo.c:14:13: error: 'ans' undeclared (first use in this function)
   14 | printf("%d",ans);
      |             ^~~
foo.c:14:13: note: each undeclared identifier is reported only once for each function it appears in
foo.c:15:1: error: expected expression before 'return'
   15 | return 0;}
      | ^~~~~~
foo.c:15:10: error: expected expression before '}' token
   15 | return 0;}
      |          ^
foo.c:11:10: warning: unused variable 'i' [-Wunused-variable]
   11 |  for(int i=a,i<=b,i++)
      |          ^
foo.c:10:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   10 |  scanf("%d %d",&a,&b);
      |  ^~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
P1216 亲和数
语言
C
递交时间
2022-03-08 19:31:45
评测时间
2022-03-08 19:31:45
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes