/* From: "COMPUTATIONAL PHYSICS, 2nd Ed" by RH Landau, MJ Paez, and CC Bordeianu Copyright Wiley-VCH, 2007. Electronic Materials copyright: R Landau, Oregon State Univ, 2007; MJ Paez, Univ Antioquia, 2007; & CC Bordeianu, Univ Bucharest, 2007 Support by National Science Foundation */ // random.c: A simple random number generator, not for serious work #include #define max 1000 // number of numbers generated #define seed 11 // seed for number generator main () { int i, old, newx, newy; FILE *output; // save data in badrand.dat output= fopen("badrand.dat","w"); old= seed; // the seed for (i = 0; i