#1:
const
Count = 3; // количество проверяемых чисел
var
m : array [1..Count] of Integer;
i, e, c: Integer;
begin
Writeln('Введите числа:');
for i := 1 to Count do
begin
Write(i ,': '); Readln( m[i] );
end;
for i := 1 to Count do
for e := 1 to Count do
if m[i] < m[e] then
begin
c := m[i];
m[i] := m[e];
m[e] := c;
end;
for i := 1 to Count do
Write(m[i], ' ');
Readln;
end.
#2:
var
a, b, c, x, y: Integer;
begin
Writeln('Введите рёбра кирпича:');
Write('a: '); Readln( a );
Write('b: '); Readln( b );
Write('c: '); Readln( c );
Writeln('Введите стороны отверстия:');
Write('x: '); Readln( x );
Write('y: '); Readln( y );
x := x*y;
if (a*b <= x) or (a*c <= x) or (b*c <= x) then
Write('Пройдёт.')
else
Write('не пройдёт.');
Readln;
end.
Const width = 10
Sub Ìàêðîñ1()
Dim Sum(heigth - 1, width - 1)
Dim Product(heigth - 1, width - 1)
For i = 0 To heigth - 1
For j = 0 To width - 1
Sum(i, j) = i + j
Product(i, j) = i * j
Next j
Next i
Call Show(Sum, 0, 0)
Call Show(Product, 0, 12)
End Sub
Sub Show(ByRef m, dx, dy)
For i = 0 To heigth - 1
For j = 0 To width - 1
ActiveSheet.Cells(dx + i + 1, dy + j + 1).Value = Hex(m(i, j))
Next j
Next i
End Sub