DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦deef77657⟧ TextFile

    Length: 369 (0x171)
    Types: TextFile
    Names: »getrand.c«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/General/Hangman1/getrand.c« 

TextFile

/*  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));
}