c From: "COMPUTATIONAL PHYSICS, 2nd Ed" c by RH Landau, MJ Paez, and CC Bordeianu c Copyright Wiley-VCH, 2007. c Electronic Materials copyright: R Landau, Oregon State Univ, 2007; c MJ Paez, Univ Antioquia, 2007; and CC Bordeianu, Univ Bucharest, 2007. c Support by National Science Foundation c c random.f: simple random number generator, not for serious work c Program random Implicit none Integer i, number, old, seed, x, y c set seed, number generated numbers seed = 11 number = 1000 Open(6, file = 'random.dat', Status = 'Unknown') old = seed c execution Do 10 i = 1, number x = Mod((57*old+1), 256) y = Mod((57*x+1), 256) Write (6, *) x, y old = y 10 Continue Close(6) Stop 'data saved in random.dat' End