1)
program zadacha1;
uses crt;
var b,i,j:integer;
c,pr:real;
a:array [1..4,1..7] of integer;
begin
clrscr;
pr:=1;
for i:=1 to 4 do
begin
for j:=1 to 7 do
begin
readln(a[i,j]);
end;
end;
for i:=1 to 4 do
begin
for j:=1 to 7 do
begin
if (a[i,j] mod 3) = 0 then pr:=pr*a[i,j];
end;
end;
pr:=pr/3;
writeln(pr:2:3);
readkey;
end.
2)
program zadacha2;
uses crt;
const k=8;
var b,i,j,sum:integer;
c,pr:real;
a:array [1..k,1..k] of integer;
begin
randomize;
clrscr;
pr:=1;
for i:=1 to k do
begin
for j:=1 to k do
begin
a[i,j]:=random(36)+10;
end;
end;
for i:=1 to k do
begin
for j:=1 to k do
write(a[i,j],' ');
writeln;
end;
for j:=1 to k do
begin
if (a[k,j] mod 5) = 0 then pr:=pr*a[i,j];
end;
for i:=1 to k do
begin
for j:=1 to k do
begin
if (i=j) and (a[i,j] > 0) then sum:=sum+a[i,j];
end;
end;
writeln('Prozvedenie ',pr:2:2);
writeln('Summa ',sum);
writeln('Raznostb ',pr-sum:2:2);
readkey;
end.
3)
program zadacha3;
uses crt;
const k=9;
var b,i,j:integer;
sred,sum,l:real;
a:array [1..k,1..k] of integer;
begin
randomize;
clrscr;
for i:=1 to k do
begin
for j:=1 to k do
begin
a[i,j]:=random(55-12+1)+12;
end;
end;
for i:=1 to k do
begin
for j:=1 to k do
write(a[i,j],' ');
writeln;
end;
for i:=1 to k do
begin
if (a[i,k] mod 2) = 1 then
begin
l:=l+a[i,k];
b:=b+1;
end;
end;
sred:=l/b;
for i:=1 to k do
begin
if a[i,i]>25 then sum:=sum+a[i,i];
end;
writeln;
writeln('Srednee ',sred:2:2);
writeln('Summa ',sum:2:1);
readkey;
end.
4)
program zadacha4;
uses crt;
const k=5;
var b,i,j:integer;
sred,sum,l:real;
a:array [1..k,1..k] of integer;
begin
randomize;
clrscr;
for i:=1 to k do
begin
for j:=1 to k do
begin
a[i,j]:=random(91)-20;
end;
end;
j:=k;
for i:=1 to k do
begin
if (a[i,j] mod 2)<> 0 then
begin
l:=l+a[i,j];
b:=b+1;
end;
j:=j-1;
end;
sred:=l/b;
for i:=1 to k do
begin
for j:=1 to k do
write(a[i,j],' ');
writeln;
end;
writeln;
writeln('Srednee ',sred:4:2);
readkey;
end.
5)
program zadacha5;
uses crt;
const k=5;
var b,i,j:integer;
sred,sum,l:real;
a:array [1..k,1..k] of integer;
begin
randomize;
clrscr;
for i:=1 to k do
begin
for j:=1 to k do
begin
a[i,j]:=random(31)-40;
end;
end;
j:=k;
for i:=1 to k do
begin
if (a[i,j] mod 2)<> 0 then
begin
l:=l+a[i,j];
b:=b+1;
end;
j:=j-1;
end;
sred:=l/b;
for i:=1 to k do
begin
for j:=1 to k do
write(a[i,j],' ');
writeln;
end;
writeln;
writeln('Srednee ',sred:4:2);
readkey;
end.
6)
program zadacha6;
uses crt;
const k=6;
var b,i,j:integer;
sred,sum,l:real;
a:array [1..k,1..k] of integer;
begin
randomize;
clrscr;
for i:=1 to k do
begin
for j:=1 to k do
begin
a[i,j]:=random(21);
end;
end;
j:=k;
for i:=1 to k do
begin
if a[i,j]>5 then
begin
l:=l+a[i,j];
end;
j:=j-1;
end;
l:=l/2;
for i:=1 to k do
begin
for j:=1 to k do
write(a[i,j],' ');
writeln;
end;
writeln;
writeln('Sum ',l:2:2);
readkey;
end.
7)
program zadacha7;
uses crt;
const k=5;
var b,i,j:integer;
pred,sum,l:real;
a:array [1..k,1..k] of integer;
begin
randomize;
clrscr;
for i:=1 to k do
begin
for j:=1 to k do
a[i,j]:=random(10);
end;
j:=k;
for i:=1 to k do
begin
l:=l+a[i,j];
j:=j-1;
end;
for i:=1 to k do
begin
for j:=1 to k do
write(a[i,j],' ');
writeln;
end;
for i:=1 to k do
begin
sum:=sum+a[i,i];
end;
pred:=sum+l;
writeln('Sum ',pred/10:2:2);
readkey;
end.
8)
program zadacha8;
uses crt;
const k=5;
var b,i,j:integer;
pred,sum,l:real;
a:array [1..k,1..k] of integer;
begin
randomize;
clrscr;
for i:=1 to k do
begin
for j:=1 to k do
a[i,j]:=random(10);
end;
j:=k;
for i:=1 to k do
begin
l:=l+a[i,j];
j:=j-1;
end;
l:=l/k;
for i:=1 to k do
begin
for j:=1 to k do
write(a[i,j],' ');
writeln;
end;
for i:=1 to k do
begin
sum:=sum+a[i,i];
end;
sum:=sum/2;
writeln('Sum ',sum:2:2);
writeln('Sred',l:2:2);
readkey;
end.
Поделитесь своими знаниями, ответьте на вопрос:
Файл размером 32 кб передаётся через некоторое соединение со скоростью 1024 бит с секунду. определите размер файла (в кб), который можно передатьза то же время через другое соединение со скоростью 256 бит в секунду. в ответе укажите одно число-размер файла в кб