Two Guys Arguing

Copyright 1988

Posted in challenge by youngnh on 11.19.10

I found this in the book I’m working my way through. It’s a bit obvious, but see if you can’t tell what it does:

10   REM unknown
20   INPUT L$(1), L$(2), L$(3), L$(4)
30   PRINT
40   FOR I1=1 TO 4
50   FOR I2=1 TO 4
60   IF I2=I1 THEN 130
70   FOR I3=1 TO 4
80   IF I3=I1 THEN 120
90   IF I3=I2 THEN 120
100   LET I4=10 - (I1 + I2 + I3)
110   LPRINT L$(I1); L$(I2); L$(I3); L$(I4);
120   NEXT I3
130   NEXT I2
140   NEXT I1
150   END

The book is Umberto Eco’s Foucault’s Pendulum.

Follow

Get every new post delivered to your Inbox.