Это будет 2 в 20й степени бит, то есть 1024 кбита.
var a,s,i:integer;
begin
randomize;
s:=0;
for i:=1 to 15 do
begin
a:=random(100);
s:=s+a;
end;
write('s=',s);
end.
<h2>PascalABC.NET 3.4.2, сборка 1978 (12.02.2019)
</h2>
- program task31143948;
- const
- N = 12;
- var
- arr: array[1..N] of real;
- Sum: real;
- begin
- Sum := 1;
- for var i := 1 to N do
- begin
- arr[i] := Random()*4 - 1;
- Writeln(arr[i]:5:2);
- if arr[i] < 0 then
- Sum := Sum * arr[i]
- end;
- if Sum = 1 then
- Write('ПРОИЗВЕДЕНИЕ = 0')
- else
- Writeln('ПРОИЗВЕДЕНИЕ = ', Sum:5:2);
- end.
Program massivy;
var array1: array [1..10] of integer;
i, b:integer;
begin
for i:=1 to 10 do
array1[i]:=random(-10, 10);
for i:=1 to 4 do begin
for b:=1 to 4 do
if array1[b] > array1[b+1] then
swap(array1[b], array1[b+1]);
end;
for i:=5 to 9 do begin
for b:=5 to 9 do
if array1[b] < array1[b+1] then
swap(array1[b], array1[b+1]);
end;
for i:=1 to 10 do
writeln(array1[i]);
end.