不是VIP会员,不能显示答案

题目解答

题目:
program exp1 (imput,output); {6%}
VAR i, s, max: integer;
a :array [1..10] of integer;
begin
for i:=1 to 10 do read (a[i]);
max:=a[1] ;s:=a[1];
for i:=2 to 10 do
begin
if s<0 then s:=0;
s:= s+a[i];
if s>max then max:=s
end;
writeln(‘max=’, MAX)
end.
输入:8 9 -1 24 6 5 11 15 -28 9
输出:max=77
考点:
分析:
解答:
评论:
老师: