Can you guess what this 14-line program does?

Everything else that doesn't fall into one of the other PB categories.
firace
Addict
Addict
Posts: 947
Joined: Wed Nov 09, 2011 8:58 am

Can you guess what this 14-line program does?

Post by firace »

Just a little challenge for your brain cells :)
Try to guess what the below code does before running it.

Code: Select all

OpenConsole()
s$ = "#" 
z$ = "561860" ;  also try 7988647 or 452 
k$ = "11010011100203011111033330102003010110100111103330"
For i = 1 To 5
  a$ = ""
  For x = 1 To Len(z$) 
    j$ = Mid(z$,x,1)
    y=Val(Mid(k$,Val(j$)*5+i,1))*8
    a$+ " "+ Mid( s$+s$+s$+s$+s$+s$+s$+s$+s$  +"              "+s$+s$ +"      "+s$, y+1, 8)
  Next
    PrintN (a$)
Next
Delay(1234)
User avatar
luis
Addict
Addict
Posts: 3895
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Can you guess what this 14-line program does?

Post by luis »

No, but must be the source of banner for Unix :)

z$ = "01223"
k$ = "33033010101111003330"
"Have you tried turning it off and on again ?"
firace
Addict
Addict
Posts: 947
Joined: Wed Nov 09, 2011 8:58 am

Re: Can you guess what this 14-line program does?

Post by firace »

luis wrote:No, but must be the source of banner for Unix :)

z$ = "01223"
k$ = "33033010101111003330"

Nice. ;) I actually wasn't aware of the Unix banner utility. The code is in fact adapted from an old codegolf challenge.
Post Reply