行列:A(N、N)の固有値と固有ベクトルを求めます。
反復法のオーソドックスな解法です。
dim a(n,n),b(n),c(n)
l1:=0
i:=1
label re
b(i):=0
j:=1
repeat
input a(i,j)
j:=j+1
until j=>n
i:=i+1
until i:=>n
repeat
b(n):=1
i:=1
repeat
c(i):=0
j:=1
repeat
c(i):=c(i)+a(i,j)*b(j)
j:=j+1
until j=>n
i=i+1
until i=>n
d:=c(n)
i:=1
repeat
c(i):=c(i)/d
i:=i+1
until i=>n
l1:=l1+1
if l:=l1 then label re
i:=1
repeat
b(i):=c(i)
i:=i+1
until i=>n
go label re
end