|
DataMuseum.dkPresents historical artifacts from the history of: RC4000/8000/9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC4000/8000/9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 1536 (0x600) Types: TextFile Names: »tmmp1«
└─⟦667bb35d6⟧ Bits:30007480 RC8000 Dump tape fra HCØ. └─⟦4334b4c0b⟧ └─⟦this⟧ »tmmp1«
begin integer array solution,guess(1:4); integer i,j,x,digitok,digitincluded; setcombination: for i:= 1 step 1 until 4 do begin random(x); solution(i):= x mod 10; for j:= 1 step 1 until i do if solution(i)=solution(j) and i<>j then i:= i-1 end; write(out,<:master mind program ready<10>:>); next: setposition(out,0,0); write(out,<: :>); read(in,guess); digitok:= digitincluded:= 0; for i:= 1,2,3,4 do begin for j:= 1,2,3,4 do if guess(i)=solution(j) then begin if i=j then digitok:= digitok+1 else digitincluded:= digitincluded+1 end; write(out,<<dd>,guess(i)) end; write(out,<: => :>, false add 43,digitok, false add 32,4-digitok, false add 45,digitincluded, false add 10,1); if digitok<4 then goto next else begin write(out,<:you got it !!<10>:>); goto setcombination end end ▶EOF◀