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
// PascalABC.NET 3.1, сборка 1201 от 18.03.2016 begin var k:=0; var n:=ReadInteger(); var nmax:=0; while n<>0 do begin Inc(k); if n mod 10 = 0 then if n>nmax then nmax:=n; n:=ReadInteger() end; var cntrl:=ReadInteger(); Writeln('Получено ',k,' чисел'); Writeln('Полученное контрольное значение: ',cntrl); Writeln('Вычисленное контрольное значение: ',nmax); if cntrl=nmax then Writeln('Контроль пройден') else Writeln('Контроль не пройден') 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