home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er
/
64ER_CD.iso
/
86xx
/
8609.d64
/
lotto
< prev
next >
Wrap
Text File
|
1995-03-30
|
471b
|
29 lines
program lotto;
const k0=10;
var a:packed array[1..49] of boolean;
i,k: integer;
function rnd(zahl:integer):real;
const a=13;
b=29;
m=63;
begin
zahl:=(a*zahl+b) mod m;
rnd:=zahl/m;
end;
begin
for i:=1 to 49 do a[i]:=false;
k:=k0;
writeln('die lottozahlen: ');
i:=0;
while i<6 do
begin
k:=trunc(rnd(k)*48+0.5)+1;
if a[k]=false then
begin
write(k:4);
i:=i+1;
a[k]:=true
end;
end; (* while-schleife *)
end.