Var A,B,C,S,P,d:integer; Begin S:=0; P:=1; d:=0; Write('A = ');Read(A); Write('B = ');Read(B); Write('C = ');Read(C); For var i:= A to B do if i mod C = 0 then Begin S:=S+i; P:=P*i; d:=1; End; if d = 1 then Write('S = ',S,' P = ',P) else Write('Таких чисел нет'); End.
A,B,C,S,P,d:integer;
Begin
S:=0;
P:=1;
d:=0;
Write('A = ');Read(A);
Write('B = ');Read(B);
Write('C = ');Read(C);
For var i:= A to B do
if i mod C = 0 then
Begin
S:=S+i;
P:=P*i;
d:=1;
End;
if d = 1 then Write('S = ',S,' P = ',P)
else Write('Таких чисел нет');
End.