Type mas=array[,]of integer; var i,j:integer; a:mas; b:mas;
procedure masmin(a:array[,]of integer); var n,m,i,j:integer; c:array of integer; begin n:=length(a,0)-1; m:=length(a,1)-1; setlength(c,m+1); writeln('Массив минимумов:'); for i:=1 to m do begin for j:=1 to n do begin if j=1 then c[i]:=a[j,1]; if a[j,i]<c[i] then c[i]:=a[j,i]; end; write(c[i],' '); end; writeln; end;
begin setlength(a,6,7); writeln('Массив А:'); for i:=1 to 5 do begin for j:=1 to 6 do begin a[i,j]:=random(10); write(a[i,j],' '); end; writeln; end; masmin(a); writeln; setlength(b,8,10); writeln('Массив B:'); for i:=1 to 7 do begin for j:=1 to 9 do begin b[i,j]:=random(10); write(b[i,j],' '); end; writeln; end; masmin(b); end.
var k,n,i,s:integer; begin readln(k,n); for i:=0 to n do s:=s+k+i; writeln(s) end.
var k,n,i,s:integer; begin readln(k,n); for i:=0 to n do s:=s+k+i; writeln(s/(n+1)) end.
var r,n,i,p:integer; begin readln(r,n); p:=1; for i:=0 to r do p:=p*(n+i); writeln(p) end.
var r,i,p,x:integer; begin readln(r); x:=1; for i:=1 to r do begin x:=x*i; p:=p+x; end; writeln(p) end.
var r,i,p,x:integer; begin readln(r); p:=1; for i:=1 to r do begin x:=x+i; p:=p*x; end; writeln(p) end.
var m,n,t,i:integer; begin readln(t); writeln('N':3,'M':5); for i:=1 to (t div 2) do begin n:=i*2; m:=sqr(n)-n; writeln(n:3,m:5); end; end.
var y,m,n,i:integer; x:real; begin readln(n,m); writeln('Y':3,'X':10); for i:=1 to m do begin y:=n*i; x:=sqr(y)*(sqr(y)-y)/y; writeln(y:3,x:10); end; end.
var
i,j:integer;
a:mas;
b:mas;
procedure masmin(a:array[,]of integer);
var
n,m,i,j:integer;
c:array of integer;
begin
n:=length(a,0)-1;
m:=length(a,1)-1;
setlength(c,m+1);
writeln('Массив минимумов:');
for i:=1 to m do
begin
for j:=1 to n do
begin
if j=1 then c[i]:=a[j,1];
if a[j,i]<c[i] then c[i]:=a[j,i];
end;
write(c[i],' ');
end;
writeln;
end;
begin
setlength(a,6,7);
writeln('Массив А:');
for i:=1 to 5 do
begin
for j:=1 to 6 do
begin
a[i,j]:=random(10);
write(a[i,j],' ');
end;
writeln;
end;
masmin(a);
writeln;
setlength(b,8,10);
writeln('Массив B:');
for i:=1 to 7 do
begin
for j:=1 to 9 do
begin
b[i,j]:=random(10);
write(b[i,j],' ');
end;
writeln;
end;
masmin(b);
end.
begin
readln(k,n);
for i:=0 to n do s:=s+k+i;
writeln(s)
end.
var k,n,i,s:integer;
begin
readln(k,n);
for i:=0 to n do s:=s+k+i;
writeln(s/(n+1))
end.
var r,n,i,p:integer;
begin
readln(r,n);
p:=1;
for i:=0 to r do p:=p*(n+i);
writeln(p)
end.
var r,i,p,x:integer;
begin
readln(r);
x:=1;
for i:=1 to r do
begin
x:=x*i;
p:=p+x;
end;
writeln(p)
end.
var r,i,p,x:integer;
begin
readln(r);
p:=1;
for i:=1 to r do
begin
x:=x+i;
p:=p*x;
end;
writeln(p)
end.
var m,n,t,i:integer;
begin
readln(t);
writeln('N':3,'M':5);
for i:=1 to (t div 2) do
begin
n:=i*2;
m:=sqr(n)-n;
writeln(n:3,m:5);
end;
end.
var
y,m,n,i:integer;
x:real;
begin
readln(n,m);
writeln('Y':3,'X':10);
for i:=1 to m do
begin
y:=n*i;
x:=sqr(y)*(sqr(y)-y)/y;
writeln(y:3,x:10);
end;
end.