记录详情

Compile Error

foo.c: In function 'main':
foo.c:5:5: error: 'cin' undeclared (first use in this function)
    5 |     cin>>n;
      |     ^~~
foo.c:5:5: note: each undeclared identifier is reported only once for each function it appears in
foo.c:5:10: error: 'n' undeclared (first use in this function)
    5 |     cin>>n;
      |          ^
foo.c:7:10: error: 'i' undeclared (first use in this function)
    7 |     for (i = 0; i < n; i++)
      |          ^
foo.c:11:9: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   11 |         scanf("%d %d %d",&a,&b,&c);
      |         ^~~~~
foo.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | //19230322 李泽钦
foo.c:11:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   11 |         scanf("%d %d %d",&a,&b,&c);
      |         ^~~~~
foo.c:11:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
foo.c:11:27: error: 'a' undeclared (first use in this function)
   11 |         scanf("%d %d %d",&a,&b,&c);
      |                           ^
foo.c:11:30: error: 'b' undeclared (first use in this function)
   11 |         scanf("%d %d %d",&a,&b,&c);
      |                              ^
foo.c:11:33: error: 'c' undeclared (first use in this function)
   11 |         scanf("%d %d %d",&a,&b,&c);
      |                                 ^
foo.c:29:9: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   29 |         printf("%d\n",B[i]);
      |         ^~~~~~
foo.c:29:9: note: include '<stdio.h>' or provide a declaration of 'printf'
foo.c:29:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
foo.c:29:9: note: include '<stdio.h>' or provide a declaration of 'printf'
foo.c:6:9: warning: variable 'B' set but not used [-Wunused-but-set-variable]
    6 |     int B[1000];
      |         ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1504 Problem 2A.拆弹专家
比赛
2023秋 悬赏令第二周
语言
C
递交时间
2023-10-21 23:27:55
评测时间
2023-10-21 23:27:55
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes