Var
A:integer;
P:real;
Begin
P:=1;
For A:= 100 to 620 do
if A mod 23 = 0 then P:=P*A;
WriteLn('P = ',P);
End.
Результат работы программы:
P = 1.5255279798308E+55
Var
A:integer;
P:real;
Begin
P:=1;
For A:= 11 downto 6 do
P:=P*A;
WriteLn('P = ',P);
End.
Результат работы программы:
P = 332640
Var B: array [1..12] of integer; i, s, s_min: integer;
begin
writeln;
randomize;
s := 0;
s_min := 0;
for i := 1 to 12 do
B[i] := random(65) - 5;
for i := 1 to 12 do
begin
write(B[i], ' ');
s := s + B[i];
if B[i] < 7
then
s_min := s_min + 1;
end;
writeln();
writeln('Sum: ', s, ', amount of elemnts which lower than 7: ', s_min);
<span>end.</span>