Noneleft @ 2015-10-12 14:53:20
var
a:array[1..1000] of longint;
n,o,i,p:longint;
begin
n:=0;
for i:= 1 to 10 do
begin
read(a[i]);
end;
read(p);
for i:= 1 to 10 do
if (p+30)>a[i] then inc(n);
write(n);
end.
//我还就想不通了
by kkksc03 @ 2015-10-12 15:27:14
@[url=/space/show?uid=9911]Noneleft[/url] 大于等于,注意审题。
by Noneleft @ 2015-10-12 15:30:59
@[url=/space/show?uid=1]kkksc03[/url] 谢谢
by 编程小黄人 @ 2015-11-04 12:59:13
程序还可以再简化一下
by taoanshi @ 2015-11-12 13:06:34
else if a[i]<=x+30 then s:=s+1;
by taoanshi @ 2015-11-12 13:07:21
else if a[i]<=x+30 then s:=s+1;
by 许志康 @ 2015-11-19 20:07:34
var a:array[1..10] of longint;b,c,d,e:longint;
begin
for b:=1 to 10 do
read(a[b]);
read(c);
for b:=1 to 10 do
if c+30>=a[b] then e:=e+1;
write(e);
end.
by LRM123 @ 2016-01-01 10:41:08
试试这个:
var
a:array[1..300]of longint;
s,i,x:longint;
begin
for i:=1 to 10 do
read(a[i]);
readln(x);
for i:=1 to 10 do
if a[i]<=(30+x) then inc(s);
writeln(s);
end.
by chenxi @ 2016-01-22 08:25:23
var
a:array[1..1000] of longint;
n,o,i,p:longint;
begin
n:=0;
for i:= 1 to 10 do
begin
read(a[i]);
end;
read(p);
for i:= 1 to 10 do
if (p+30)>a[i] then inc(n);
write(n);
end.
LZ代码改好了,>=
by lyricleeee04 @ 2016-08-14 16:08:18
==你可以模拟_>###_