pascal大神来

pascalNOIP那次的陶陶摘苹果为什么错
代码如下
var maths,high,i:integer;
f:array[1..10] of integer;
begin
{assign('foo.in');
assign('foo.out'):
reset(input);
rewrite(output);}
maths:=0;
readln(high);
for i:=1 to 10 do
begin
read(f[i]);
if f[i]<=high then maths:=maths+1
else if f[i]<=(high+30) then
maths:=maths+1;
end;
writeln(maths);
close(input);
close(output);
end.

9 条评论

  • @ 2016-10-19 21:01:17

    谢谢

  • @ 2016-10-18 21:13:07

    AC
    pascal
    var maths,high,i:integer;
    f:array[1..10] of integer;
    begin
    maths:=0;
    for i:=1 to 10 do read(f[i]);
    read(high);
    for i:=1 to 10 do
    begin
    if f[i]<=high then maths:=maths+1
    else if f[i]<=(high+30) then
    maths:=maths+1;
    end;
    writeln(maths);
    end.

  • @ 2016-10-18 21:10:43

    先读入苹果的高度,再读入陶陶的高度

  • @ 2016-10-18 21:09:14

    还有别的错误么

  • @ 2016-10-18 21:08:55

    不加文件它说我错

  • @ 2016-10-18 21:08:39

    ??

  • @ 2016-10-18 21:06:05

    还有,是先读入苹果的高度,再度入陶陶的高度

  • @ 2016-10-18 21:03:51

    不要加文件

  • @ 2016-10-18 21:02:50

    本人是联赛新手,请大神指教

  • 1

信息

ID
1102
难度
3
分类
模拟 点击显示
标签
递交数
16728
已通过
8791
通过率
53%
被复制
58
上传者