*** empty log message ***

This commit is contained in:
em
1984-11-29 14:22:02 +00:00
parent 0c0c3b7892
commit ae1e81adb1
36 changed files with 1740 additions and 0 deletions

25
lang/basic/lib/random.c Normal file
View File

@@ -0,0 +1,25 @@
/* $Header $ */
_randomize()
{
int i;
double f;
_setchannel(-1);
printf("Random number seed (-32768 to 32767) ? ");
_readint(&i);
f=i;
_setrandom(f);
}
_setrandom(f)
double f;
{
int i;
i=f;
srand(i);
}
double _rnd(d) double d;
{
double f; f= (int) rand();
return(f/32767.0);
}