Now type the program r1.c . This compiles both your program and uni.c . 2u - 1 Problem set 1 Modify r1.c so that you can enter the seed value and the number of random numbers to be printed. You may want to change the output format. Devise a program which simulates random walk in one dimension.
Random walk models the motion of a small particle in a thin tube of water.
It is repeatedly hit, but at random, by the water molecules surrounding it. As your first application of this program, find the distance moved from the origin by the particle in 100 steps. Let our particle perform a 10-step random walk 100 times. Redo the previous problem for 100-step random walks. Study the relative shape of the frequency histograms.