home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume4 / mazemaze < prev    next >
Encoding:
Text File  |  1989-02-03  |  1.1 KB  |  29 lines

  1. Path: xanth!mcnc!gatech!rutgers!tut.cis.ohio-state.edu!cwjcc!hal!ncoast!allbery
  2. From: tromp@cwi.nl.UUCP (John Tromp)
  3. Newsgroups: comp.sources.misc
  4. Subject: v04i110: An amazingly small C-program
  5. Message-ID: <7656@boring.cwi.nl>
  6. Date: 30 Sep 88 23:32:22 GMT
  7. Sender: allbery@ncoast.UUCP
  8. Reply-To: tromp@cwi.nl.UUCP (John Tromp)
  9. Organization: CWI, Amsterdam
  10. Lines: 16
  11. Approved: allbery@ncoast.UUCP
  12.  
  13. Posting-number: Volume 4, Issue 110
  14. Submitted-by: "John Tromp" <tromp@cwi.nl.UUCP>
  15. Archive-name: mazemaze
  16.  
  17. [This one should have been entered in the Obfusticated C contest.  ++bsa]
  18.  
  19. Run this C-program and enter a number. Ain't that amazing ?
  20. John Tromp (tromp@piring.cwi.nl)
  21.  
  22. char*M,A,Z,E=40,J[40],T[40];main(C){for(*J=A=scanf(M="%d",&C);
  23. --            E;             J[              E]             =T
  24. [E   ]=  E)   printf("._");  for(;(A-=Z=!Z)  ||  (printf("\n|"
  25. )    ,   A    =              39              ,C             --
  26. )    ;   Z    ||    printf   (M   ))M[Z]=Z[A-(E   =A[J-Z])&&!C
  27. &    A   ==             T[                                  A]     
  28. |6<<27<rand()||!C&!Z?J[T[E]=T[A]]=E,J[T[A]=A-Z]=A,"_.":" |"];}
  29.