var i, s, p :integer; begin write ('n='); readln (n); s:=0; p:=1; for i:=1 to n do begin if i mod 5=0 then s:=s+i; if i mod 3=0 then p:=p*i end; Writeln ('s=', s, ' p=', p) end.
2) var i, s, p :integer; begin write ('n='); readln (n); s:=0; p:=1; i:=1 while i<= n do begin if i mod 5=0 then s:=s+i; if i mod 3=0 then p:=p*i; i:=i +1; end; Writeln ('s=', s, ' p=', p) end.
i, s, p :integer;
begin
write ('n=');
readln (n);
s:=0;
p:=1;
for i:=1 to n do
begin
if i mod 5=0 then s:=s+i;
if i mod 3=0 then p:=p*i
end;
Writeln ('s=', s, ' p=', p)
end.
2)
var
i, s, p :integer;
begin
write ('n=');
readln (n);
s:=0;
p:=1;
i:=1
while i<= n do
begin
if i mod 5=0 then s:=s+i;
if i mod 3=0 then p:=p*i;
i:=i +1;
end;
Writeln ('s=', s, ' p=', p)
end.