Program mew; var a: array [1..100] of integer; sum,i: integer; begin sum:=0; for i:=1 to 100 do begin a[i]:=random(100); if (a[i] <> 0) and (a[i] mod 7 = 0) then begin write(a[i], ' '); sum:=sum+a[i]; end; end; writeln('Сумма равна',' ', sum); end.
begin write ('vvardite massiv='); for i:= 1 to 100 do readln(a[i]); s:=0; for i:= 1 to n do if (a[i]>0) and (a[i] mod 7 =0) then s:=s+a[i]; writeln(' summa cisel deliscihsia na 7'=,s); readln; end.
var a: array [1..100] of integer;
sum,i: integer;
begin
sum:=0;
for i:=1 to 100 do
begin
a[i]:=random(100);
if (a[i] <> 0) and (a[i] mod 7 = 0) then
begin
write(a[i], ' ');
sum:=sum+a[i];
end;
end;
writeln('Сумма равна',' ', sum);
end.
i,s:integer;
begin
write ('vvardite massiv=');
for i:= 1 to 100 do
readln(a[i]);
s:=0;
for i:= 1 to n do
if (a[i]>0) and (a[i] mod 7 =0) then s:=s+a[i];
writeln(' summa cisel deliscihsia na 7'=,s);
readln;
end.