【说明】
以下程序为求行列式X(5,5)的值S。
【Visual Basic代码】
Private Function col ( byval x ( 5,5 ) as integer ) as long
dim fesult as long
dim temp as long
dim I as integer
dim j as integer
dim k as imeger
result = 0
for I = to 5
(1)
for j = 1 to 5
if I+j>6 then
k= ( 1+j ) mod 5
else
k=1
endif
temp=temp*x ( k,j )
(2)
result= (3)
(4)
(5)
End function