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
Var N,C,k,d:integer; Begin Write('N = ');ReadLn(N); For N:= 1 to N do Begin C:=N; k:=0; d:=0; While C<>0 do Begin k:=k+1; if C mod 10 <> 0 then if N mod (C mod 10) = 0 then d:=d+1; C:= C div 10 End; if d=k then Write(N,' ') End; End.