|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 369 (0x171)
Types: TextFile
Names: »getrand.c«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
└─⟦this⟧ »EUUGD18/General/Hangman1/getrand.c«
/* getrand.c
* returns a random number that is the # to the word in word list
* written by: ritcv!jxs7451
*/
#include "hangman.h"
#include<stdio.h>
long getrand()
{
float one = random(),two = random(),tmp;
int goo;
tmp = one / two;
goo = (int) tmp;
tmp -= goo; /* now have a random # between 0 and 1 */
return((long) (tmp * WORDMAX + 1));
}