记录详情

Compile Error

foo.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
foo.c: In function 'main':
foo.c:17:3: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   17 |   scanf("%d",&n);
      |   ^~~~~
foo.c:17:3: warning: incompatible implicit declaration of built-in function 'scanf'
foo.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include<stdio.h>
foo.c:18:7: warning: implicit declaration of function 'prime' [-Wimplicit-function-declaration]
   18 |    if(prime(n))
      |       ^~~~~
foo.c:30:12: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   30 |            printf("%d\n,cnt");
      |            ^~~~~~
foo.c:30:12: warning: incompatible implicit declaration of built-in function 'printf'
foo.c:30:12: note: include '<stdio.h>' or provide a declaration of 'printf'
foo.c:30:21: warning: format '%d' expects a matching 'int' argument [-Wformat=]
   30 |            printf("%d\n,cnt");
      |                    ~^
      |                     |
      |                     int
foo.c:16:9: warning: variable 'a' set but not used [-Wunused-but-set-variable]
   16 | { int n,a,b,flag,cnt;
      |         ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
比赛
2022春 C语言课程设计 作业1
语言
C
递交时间
2022-02-28 19:30:51
评测时间
2022-02-28 19:30:51
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes