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
Uses crt;var ADR:array[1..10] of string; sub:array[1..10] of string; i,k:integer; s:string; begin; for i:=1 to 10 do begin; writeln('Input town of ',i,'student'); readln(s); ADR[i]:=ADR[i]+s+' '; writeln('Input street of ',i,'student'); readln(s); ADR[i]:=ADR[i]+s+' '; writeln('Input house of ',i,'student'); readln(s); ADR[i]:=ADR[i]+s+' '; writeln('Input apartament of ',i,'student'); readln(s); ADR[i]:=ADR[i]+s; if pos('Краснодар',ADR[i])<>0 then begin; inc(k); sub[k]:=ADR[i]; end; end; TextColor(4); writeln('Result:'); for i:=1 to k do writeln(sub[i]); end.
for i in range (5,21):
V = i**3
print('Объём куба со стороной',i,'равен',V)