/ Vijos /

记录详情

Compile Error

foo.c: In function 'main':
foo.c:14:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
  for(int j=1;j<=n;j++)
  ^
foo.c:14:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
foo.c:16:2: warning: format '%lf' expects argument of type 'double *', but argument 2 has type 'double' [-Wformat=]
  scanf("%lf",x[j]);
  ^
foo.c:18:2: warning: format '%lf' expects argument of type 'double *', but argument 2 has type 'double' [-Wformat=]
  scanf("%lf",y[j]);
  ^
foo.c:21:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
  for(int i=1;i<=n;i++)
  ^
foo.c:5:10: warning: variable 'waste' set but not used [-Wunused-but-set-variable]
  int n,r,waste;
          ^

信息

递交者
类型
递交
题目
P1007 绕钉子的长绳子
语言
C
递交时间
2015-11-05 17:14:38
评测时间
2015-11-05 17:14:39
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes