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
Program lab3;const n=10; {количество элементов в массиве} var A:array [1..n] of real; {объявление массива А} i:byte; {переменная для циклов} b:boolean; {идентификатор роста}begin writeln('vvedite tselie chisla matrici A[',n,',',n,']'); for i:=1 to n do begin {циклвводавмассив} write('A[',i,'] = '); readln(A[i]); end; writeln; writeln('matraca imeet vid: '); for i:=1 to n do begin {циклвыводамассива} write(A[i]:3:3,' '); end; writeln; b := true; for i:=1 to n-1 do {цикл определения роста} if (A[i] > A[i+1]) then begin {если текущий больше следующего} b := false; {значит масив невозростающий} break; end; if (b) then writeln('Masiv A - vozrostaushaya posledovatelnost''') else writeln('Masiv A - ne vozrostaushaya posledovatelnost'''); readln;
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