|
DataMuseum.dkPresents historical artifacts from the history of: CP/M |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about CP/M Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 512 (0x200) Types: TextFile Names: »HANOI.SCL«
└─⟦216f59cd8⟧ Bits:30002641 SCANLOG - Piccoline vers. nov. 87 └─ ⟦this⟧ »HANOI.SCL«
; TOWERS of HANOI ; =============== ; ; Dette problem har en meget stor plads- ; og tidskompleksitet. ; ; hanoi(N) hvis flyt(N,højre,midterste,venstre). flyt(0,V1,V2,V3). flyt(N,Pind1,Pind2,Pind3) hvis N > 0, M = værdi_af(N-1), flyt(M,Pind1,Pind3,Pind2), skriv('Flyt en plade fra den',Pind1,'pind til den',Pind2,'pind.'), nylinie og flyt(M,Pind3,Pind2,Pind1). «eof»