记录详情

Compile Error

foo.c: In function 'main':
foo.c:6:10: warning: format '%d' expects a matching 'int *' argument [-Wformat=]
    6 |  scanf("%d,&x")
      |         ~^
      |          |
      |          int *
foo.c:6:16: error: expected ';' before 'for'
    6 |  scanf("%d,&x")
      |                ^
      |                ;
    7 |   for(i=2;i<x;i++)
      |   ~~~           
foo.c:12:2: error: 'else' without a previous 'if'
   12 |  else
      |  ^~~~
foo.c:13:3: warning: implicit declaration of function 'priintf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   13 |   priintf("No");
      |   ^~~~~~~
      |   printf
foo.c:5:8: warning: unused variable 'x' [-Wunused-variable]
    5 |  int i,x;
      |        ^
foo.c:5:6: warning: unused variable 'i' [-Wunused-variable]
    5 |  int i,x;
      |      ^
foo.c:6:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
    6 |  scanf("%d,&x")
      |  ^~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A3-2 素数专题:素数判断
比赛
2022春 C语言课程设计 作业1
语言
C
递交时间
2022-02-25 15:48:51
评测时间
2022-02-25 15:48:51
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes