Var a: array[1..15] of integer; i, sum, count: integer; begin for i:=1 to 15 do readln(a[i]); sum := 0; count := 0; for i:=1 to 15 do if a[i] > 0 then begin sum := sum + a[i]; inc(count); end; writeln(sum, ' ', count); end.
Program n1; var a: array [1..15] of integer; S,k, i: integer; begin for i:=1 to 15 do readln(a[i]); S:=0; k:=1; for i:=1 to 15 do begin if(a[i]>0) then begin S:=S+a[i]; k:=k+1; end; end; writeln(k); writeln(S); end.
a: array[1..15] of integer;
i, sum, count: integer;
begin
for i:=1 to 15 do
readln(a[i]);
sum := 0; count := 0;
for i:=1 to 15 do
if a[i] > 0 then
begin
sum := sum + a[i];
inc(count);
end;
writeln(sum, ' ', count);
end.
var a: array [1..15] of integer;
S,k, i: integer;
begin
for i:=1 to 15 do readln(a[i]);
S:=0;
k:=1;
for i:=1 to 15 do
begin
if(a[i]>0) then
begin
S:=S+a[i];
k:=k+1;
end;
end;
writeln(k);
writeln(S);
end.