home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 January
/
usenetsourcesnewsgroupsinfomagicjanuary1994.iso
/
sources
/
unix
/
volume5
/
smallc
/
part3
/
lib
/
rand.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1986-11-30
|
216 b
|
18 lines
int xxseed;
srand (x) int x; {
xxseed = x;
}
rand () {
xxseed = xxseed * 251 + 123;
if (xxseed < 0) xxseed = - xxseed;
return (xxseed);
}
getrand () {
puts ("Type a character");
return (getchar() * 123);
}