Ответы
1)
var
sum,counter, i:integer;
begin
counter := 0;
i := 3;
sum := 0;
while ( counter < 10) do begin
if ( i mod 3 = 0) then begin
counter := counter + 1;
sum := sum + i;
end;
i := i + 3;
end;
write(sum);
end.
2)
var
sum,counter, i:integer;
begin
counter := 0;
i := 7;
sum := 1;
while ( counter < 8) do begin
if ( i mod 7 = 0) then begin
counter := counter + 1;
sum := sum * i;
end;
i := i + 7;
end;
write(sum);
end.
3)
var
sum,counter, i:integer;
begin
counter := 0;
i := 2;
sum := 1;
while ( counter < 25) do begin
if ( i mod 2 = 0) then begin
counter := counter + 1;
write(i , ' ');
end;
i := i + 2;
end;
end.
4)
var
sum,counter, i:integer;
begin
counter := 0;
i := 5;
sum := 1;
while ( counter < 15) do begin
if ( i mod 5 = 0) then begin
counter := counter + 1;
write(i , ' ');
end;
i := i + 5;
end;
end.
5)
var
x:integer;
begin
read(x);
while( x <> 1) do begin
x := x div 2;
end;
write(x);
end.