#include <iostream>
#include <cstdlib>
using namespace std;
int main(){
int a[16];
int i=0,c;
for(i; i<16; i++){
a[i]=rand()%40+10;
cout<<a[i]<<' ';
}
i=0;
for(i; i<4; i++){
c=a[i];
a[i]=a[7-i];
a[7-i]=c;
}
for(i=8; i<12; i++){
c=a[i];
a[i]=a[23-i];
a[23-i]=c;
}
cout<<endl;
for (i=0; i<16; i++){
cout<<a[i]<<' ';
}
return 0;
}
Вроде правильно, проверь. Вопросы, недочеты в ЛС
Const n=10;
var a:array[1..10] of integer;
i,j,z:integer;
begin
writeln('Исходный массив: ');
for i:=1 to n do begin
a[i]:=random(100);
write(a[i]:4);
end;
writeln;
for i:=6 to 9 do
for j:=i+1 to 10 do
if a[i]<a[j] then
begin
z:=a[i];
a[i]:=a[j];
a[j]:=z;
end;
Write('Результат: ');
for i:=1 to 10 do
Write(a[i]:4);
end.
1 Мбайт = 1024 Кбайт
1/16 Мбайта = 64 Кбайта
64 Кбайт = 65536 байт
65536 байт = 524288 бит
2^i = 16; i = 4;
524288 / 4 = 131072 символов