记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:5:4: error: expected ',' or ';' before 'for'
    for(int i = 1;i <= 2024;i++){
    ^~~
/in/foo.c:5:18: error: 'i' undeclared (first use in this function)
    for(int i = 1;i <= 2024;i++){
                  ^
/in/foo.c:5:18: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:5:31: error: expected ';' before ')' token
    for(int i = 1;i <= 2024;i++){
                               ^
/in/foo.c:5:31: error: expected statement before ')' token
/in/foo.c:6:11: warning: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   if(i == sqrt(i)&&isqrt(i) == i){
           ^~~~
/in/foo.c:6:11: warning: incompatible implicit declaration of built-in function 'sqrt'
/in/foo.c:6:11: note: include '<math.h>' or provide a declaration of 'sqrt'
/in/foo.c:6:20: warning: implicit declaration of function 'isqrt' [-Wimplicit-function-declaration]
   if(i == sqrt(i)&&isqrt(i) == i){
                    ^~~~~
/in/foo.c:10:70: error: stray '\357' in program
     printf("The number of perfect squares between 1 and 2023 is %d\n",count);
                                                                      ^
/in/foo.c:10:71: error: stray '\274' in program
     printf("The number of perfect squares between 1 and 2023 is %d\n",count);
                                                                       ^
/in/foo.c:10:72: error: stray '\214' in program
     printf("The number of perfect squares between 1 and 2023 is %d\n",count);
                                                                        ^
/in/foo.c:10:73: error: expected ')' before 'count'
     printf("The number of perfect squares between 1 and 2023 is %d\n",count);
                                                                         ^~~~~
/in/foo.c:10:66: warning: format '%d' expects a matching 'int' argument [-Wformat=]
     printf("The number of perfect squares between 1 and 2023 is %d\n",count);
                                                                  ^

信息

递交者
类型
递交
题目
P1490 A. 完全平方数
比赛
2023年新生赛(第三场)
语言
C
递交时间
2023-09-09 18:39:08
评测时间
2023-09-09 18:39:08
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes