function F() : integer; var k,i : integer; begin k := 0; for i := 100 to 999 do if (i mod 13 = 0) and (i mod 100 <> 3) then k := k +1; Result := k; end;
begin writeln (f()); end.
const n = 30; var a : array [1..n] of integer; i,b : integer; r : boolean; begin readln (b); i := 1; r := false; While (not r) and (i <= n) do begin if a[i] = b then r := true; i := i +1; end; if r then writeln ('Есть') else writeln ('Нет'); end.
Var a: Array[1..30,1..30] of Integer; n,min, max, i,j,s: Integer; BEGIN writeln('n='); readln(n); Randomize; Writeln('sluciayniy massiv:'); For i:=1 to n do begin For j:=1 to n do begin a[i,j]:=Random(51)-25; Write(a[i,j]:5); end; Writeln; end; s:=0; min:= a[1,1]; max:= a[1,1]; for i:= 1 to n do for j:= 1 to n do if a[i,j]<min then min := a[i,j]; for i:= 1 to n do for j:= 1 to n do if a[i,j]> max then max:= a [i,j]; for i:=1 to n do for j:= 1 to n do if i=j then s:= s+a[i,j]; writeln('min=',min, ' max=',max,' summa elementov glavnoi dioganali=',s); readln; end.
Var a: Array[1..100,1..100] of Integer; n,min, max, i,j,s:Integer; BEGIN writeln('n='); readln(n);
Writeln('vvedite massiv:'); For i:=1 to n do begin For j:=1 to n do begin read(a[i,j]); end; Writeln; end; s:=0; min:= a[1,1]; max:= a[1,1]; for i:= 1 to n do for j:= 1 to n do if a[i,j]<min then min := a[i,j]; {поиск минимального элемента } for i:= 1 to n do for j:= 1 to n do if a[i,j]> max then max:= a [i,j]; {поиск максимального элемента} for i:=1 to n do for j:= 1 to n do if i=j then s:= s+a[i,j]; { поиск элементов главной диагонали и нахождение их суммы} writeln('min=',min, ' max=',max,' summa elementov glavnoi dioganali=',s); readln; end.
function F() : integer;
var
k,i : integer;
begin
k := 0;
for i := 100 to 999 do
if (i mod 13 = 0) and (i mod 100 <> 3) then
k := k +1;
Result := k;
end;
begin
writeln (f());
end.
const
n = 30;
var
a : array [1..n] of integer;
i,b : integer;
r : boolean;
begin
readln (b);
i := 1;
r := false;
While (not r) and (i <= n) do
begin
if a[i] = b then
r := true;
i := i +1;
end;
if r then
writeln ('Есть')
else
writeln ('Нет');
end.
a: Array[1..30,1..30] of Integer;
n,min, max, i,j,s: Integer;
BEGIN
writeln('n=');
readln(n);
Randomize;
Writeln('sluciayniy massiv:');
For i:=1 to n do
begin
For j:=1 to n do begin
a[i,j]:=Random(51)-25;
Write(a[i,j]:5);
end;
Writeln;
end;
s:=0;
min:= a[1,1];
max:= a[1,1];
for i:= 1 to n do
for j:= 1 to n do
if a[i,j]<min then
min := a[i,j];
for i:= 1 to n do
for j:= 1 to n do
if a[i,j]> max then
max:= a [i,j];
for i:=1 to n do
for j:= 1 to n do
if i=j then
s:= s+a[i,j];
writeln('min=',min, ' max=',max,' summa elementov glavnoi dioganali=',s);
readln;
end.
Var
a: Array[1..100,1..100] of Integer;
n,min, max, i,j,s:Integer;
BEGIN
writeln('n=');
readln(n);
Writeln('vvedite massiv:');
For i:=1 to n do
begin
For j:=1 to n do
begin
read(a[i,j]);
end;
Writeln;
end;
s:=0;
min:= a[1,1];
max:= a[1,1];
for i:= 1 to n do
for j:= 1 to n do
if a[i,j]<min then min := a[i,j]; {поиск минимального элемента }
for i:= 1 to n do
for j:= 1 to n do
if a[i,j]> max then max:= a [i,j]; {поиск максимального элемента}
for i:=1 to n do
for j:= 1 to n do
if i=j then s:= s+a[i,j]; { поиск элементов главной диагонали и нахождение их суммы}
writeln('min=',min, ' max=',max,' summa elementov glavnoi dioganali=',s);
readln;
end.