Программа:
Pascal:
var
arr: array[1..9] of integer;
i, s: integer;
begin
for i := 1 to 9 do begin
arr[i] := random(-15, 30);
if (arr[i] > -5) and (arr[i] < 15) then s := s + arr[i];
end;
writeln(arr); writeln(s);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
Программа:
Pascal:
var
arr: array[1..9] of integer;
i, s: integer;
begin
for i := 1 to 9 do begin
arr[i] := random(-15, 30);
if (arr[i] > -5) and (arr[i] < 15) then s := s + arr[i];
end;
writeln(arr); writeln(s);
end.