Var a2,a,c,sym: integer; begin for a:=100 to 200 do begin a2:=a; while (a2<>0) do begin c:=a2 mod 10; a2:=a2 div 10; end; if (a mod 7 = 0 ) and ((c=1) or (c=4)) then sym:=sym+a; end; writeln('сумма чисел от sym=',sym); end.
var sum, i : integer; begin for i := 100 to 200 do if (i mod 7 = 0) and ((i div 100 = 4) or (i div 100 = 1)) then sum := sum + i; writeln('Сумма равна ', sum) end.
integer;
begin
for a:=100 to 200 do begin
a2:=a;
while (a2<>0) do begin
c:=a2 mod 10;
a2:=a2 div 10;
end;
if (a mod 7 = 0 ) and ((c=1) or (c=4)) then sym:=sym+a;
end;
writeln('сумма чисел от sym=',sym);
end.
begin
for i := 100 to 200 do
if (i mod 7 = 0) and ((i div 100 = 4) or (i div 100 = 1)) then sum := sum + i; writeln('Сумма равна ', sum)
end.