Subject: oops... (random letter stereogram...)

From: [email-masked] (Greg Alt - Perp)
Date: 21 Feb 92 22:38:51 GMT

The code I posted works with Turbo C, but to get it to work with unix,
change the "random(92)" to something that gives a random number between
0 and 92...  I changed mine to "random()%92" and it works...
 
Here's the fixed code:
 
#include <stdlib.h>
main()
{
char m[100],s[80];
int j,i,e;
 
for(e=0;e<5;printf("X%15s",""),e++);
for(puts(""),scanf("%d\n",&j);gets(m),j>=0;puts(s),j--)
for(e=s[79]=i=0;i<79;s[i++]=(e||i<16)?'!'+random()%92:s[i-16])
for(e=0;m[i-16]=='#'&&i<79&&i>15;e=1,s[i]=s[i++-15]);
}

and here's some sample output...
 
X               X               X               X               X               
NCHgXng4<#\xfy@DNCHgXng4<#\xfy@DNCHgXng4<#\xfy@DNCHgXng4<#\xfy@DNCHgXng4<#\xfy@
@cQguJ/-@"",{0%t@cQguJ/-@"",{0%t@cQguJ/-@"",{0%t@cQguJ/-@"",{0%t@cQguJ/-@"",{0%
RM_.fqAMsHH(lgLXRM_.fqAMsHH(lgLXRM_.fqAMsHH(lgLXRM_.fqAMsHH(lgLXRM_.fqAMsHH(lgL
MHBm=yE\zG4x"8pTMHB=yE\zG4x"8pT0MHB=yE\zG4"8pT0zMHB=yE\z4"8p-T0zMHB=yE\4"8pu-T0
:uFYi9`$$/[x"!5?:uFi9`$$/[x"!5?E:uFi9`$/[x"!5?E:uFYi9`$/x"!5z?E:uFYi9`$x"!5Bz?E
K1fMq%$$JXycxjgdK1fq%$$JXycxjgd&K1fq%$JXycxjgd&K1fq%K$JXcxjghd&K1fq%K$JcxjgQhd&
%Fu'n-E6ej$4{5,o%Fun-E69ej$4{5,o%FunE69ejW$4{5,o%unE6>9ej$4{5.,o%unE6>ej$42{5.,
b<-O'=!Q(y!uq'3!b<-'=!QK(y!uq'3!b<-'!QK(Hy!uq'3!b-'!Q2K(H!uq'93!b-'!Q2(H!usq'93
m_+Dykz:D/|`cvf#m_+ykz:BD/|`cvf#m_+kz:BbD/|`cv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e\{(9T4)e.W:gzx2e\(9T4)e.jW:gzx2e\(
LTfmw*(:>)DliC_ALTfw*(:">)DliC_ALTw*(:3">)DliCALTw*v(:3">)DliCLTw*v(:h3">)DliCL
1qEAPCH6yX#p04`*1qEPCH6yX#p04`*>1qECH6yX#p04`*>1qhECH6yX#p04`*1qhECH6kyX#p04`*1
[p3s(UUH"4AiD61d[p3(UUH"4AiD61d1[p3(UH"4AiD61d1S[p3(UH"4AiD61d1[p3(UXH"4AiD61d1
Fw3pjB(uKE`:K{tAFw3jB(uKE`:K{tA'Fw3jB(uK`:K{ttA'Fw3jB(uK`:K{ttA'Fw3jB(uK`:K{ttA
BNuU;-DP=S,;.R]ABNuU;-DP=S,;.R]ABNuU;-DP=S,;.R]ABNuU;-DP=S,;.R]ABNuU;-DP=S,;.R]
mJbtBYdN>3t]{zThmJbtBYdN>3t]{zThmJbtBYdN>3t]{zThmJbtBYdN>3t]{zThmJbtBYdN>3t]{zT
tth2$W-h.8N;5.'Ntth2$W-h.8N;5.'Ntth2$W-h.8N;5.'Ntth2$W-h.8N;5.'Ntth2$W-h.8N;5.'
#imlmUeV3]6YZ5my#imlmUeV3]6YZ5my#imlmUeV3]6YZ5my#imlmUeV3]6YZ5my#imlmUeV3]6YZ5m

-- 
/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)/)
 "I speak only for myself" -me ) "But if someone came for you one night
 _     _  _     _    ___       )  and dragged you away, do you really 
( ` D  L ( `   /_\ |  |        )  think your neighbors would even care?"
 \7 |\ L  \7   | | L_ |        )    --Jello Biafra, 
      ([email-masked])        )  _Last Scream of the Missing Neighbors_