Задача №1
var a:array[1..3, 1..4] of integer;
<span>i,j,min:integer; </span>
<span>begin </span>
<span>for i:=1 to 3 do </span>
<span>for j:=1 to 4 do begin </span>
<span>read(a[i,j]); </span>
<span>if a[i,j]<0 then min:=a[i,j]; </span>
<span>end; </span>
<span>for i:=1 to 3 do </span>
<span>for j:=1 to 4 do </span>
<span>if (a[i,j]<0) and (a[i,j]<min) then min:=a[i,j]; </span>
<span>writeln('Минимальное отрицательное число ',min); </span>
<span>end.
</span>
Задача №2
var a:array[1..2, 1..5] of integer;
<span>i,j:integer; </span>
<span>begin </span>
<span>for i:=1 to 2 do </span>
<span>for j:=1 to 5 do read(a[i,j]); </span>
<span>for i:=1 to 2 do begin </span>
<span>for j:=1 to 5 do </span>
<span>write(a[i,j],' '); </span>
<span>writeln; </span>
<span>end; </span>
<span>end.
</span>
Задача №3
var a:array[1..3, 1..4] of integer;
<span>i,j:integer; </span>
<span>begin </span>
<span>for i:=1 to 3 do </span>
<span>for j:=1 to 4 do read(a[i,j]); </span>
<span>for i:=1 to 3 do </span>
<span>for j:=1 to 4 do </span>
<span>if a[i,j]=10 then writeln('Номер столбца — ',j,' Номер строки — ',i); </span>
<span>end. </span>
Решим задание наоборот: 12 -> 8, 31 -> 14, команды меняем на противоположные.
Команда 1: подели на 3.
Команда 2: прибавь 5.
12 -> 8.
12 : 3 = 4 (1).
4 + 5 = 9 (2).
9 : 3 = 3 (1).
3 + 5 = 8 (2).
Пишем команды снизу-вверх: 2121.
31 -> 14.
31 + 5 = 36 (2).
36: 3 = 12 (1).
12 : 3 = 4 (1).
4 + 5 = 9 (2).
9 + 5 = 14 (2).
Пишем снизу-вверх: 22112.
Uses crt;
var a,b,c: integer;
begin
for a:=1 to 9 do
for b:=1 to 9 do
for c:=0 to 9 do
if a+10*a+b+100*a+10*b+c=100*b+10*c+b
then writeln(a,' ',b,' ', c);
<span>end.</span>
var
n, d, min: integer;
begin
read(n);
n := abs(n); // Если введено отрицательное
min := 10;
while n > 0 do
begin
d := n mod 10;
n := n div 10;
if d < min then
min := d;
end;
write(min);
end.
__________555______555
___________55555____55555
__________5555555__5555555
___5555____55555____55555____5555
5555555555__555______555__5555555555
5555555555_______55_______5555555555
___5555________555555________5555
_____________55$$$55555
___5555________555555________5555
5555555555_______55_______5555555555
5555555555__555______555__5555555555
___5555____55555____55555____5555
__________5555555__5555555
___________55555__$_55555
____________555___$__555
__________________$
___________$$$$___$
__________$$$$$$__$_______$$
_________$$$$$$$$_$____$$
_________$$__$$$$_$__$$$
__________$$$__$$_$_$$_$
___________$$$_$$_$$$_$
___________$$$$__$$$_$$
_____________$$$$$__$_$
______________$$$$$$
<span>__________________$$</span>____________$$$$$$
___________$$$$$$$$
___$$$$$$$__$$$$$$__$$$$$$
__$$$$$$$$$_ $$$$$_ $$$$$$$$
___$$$$$$$$$_$$$$$_$$$$$$$$
____$$$$$$$$_ $$$$_$$$$$$$
________$$$$$_$$$_$$$$$
_$$$$$$$$$_ $____$_$$$$$$$$$
$$$$$$$$$$ $______$ $$$$$$$$$$
$$$$$$$$$$$______ $$$$$$$$$$$
_$$$$$$$$$_$_____$_$$$$$$$$$
_________$$$$$_$$$_$$$$$
_____$$$$$$$$_ $$$$_$$$$$$$
____$$$$$$$$$_$$$$$_$$$$$$$$
___$$$$$$$$$_ $$$$$_ $$$$$$$$
____$$$$$$$__$$$$$$__$$$$$$
____________$$$$$$$$_$$
_____________$$$$$$_ $$
______$$$$$_________$$
_____$$$$$$$_______ $$
___$$$$$$$$$$$_____$$
_____ $$$$$$$$$___ $$
________$$$$$$$__$$
__________$$$$$_$$
___________$$$$$$
____________$$$$
_____________$$
____________$$____$$$$$$$
___________ $$___$$$$$$$$$$
___________$$__$$$$$$$$
___________$$_$$$$$$
___________$$_$$$$$
___________$$$$$$
___________$$$$
<span>___________$$
</span>