My assignment is as so: "Visual C provides a function RAND() to generate a uniformly distributed random value
between [0, 1]. (You must include “stdlib.h” in the header.) Another function SRAND(#)
inputs the seed (#) to RAND(). For identical seed (#), RAND() will generate the same
sequence of random numbers. Use a constant value for seed (do NOT use # = time) in order
to simplify the debugging process.
In the first exercise with initial value of t0 = 0, write a C program to generate one random
value (r1) between [0, 1] with a chosen seed (s1). Add this random value to t0 and calculate
t1 = t0 + r1. AFTER calculate t1, generate r2 and calculate t2 = t1 + r2. Repeat the process
for ten random values r1 to r10 and t1 to t10. List r1 to r10 and t1 to t10 in a table.
Repeat the same exercise with a different seed (s2). A different seed will generate a different
sequence of random numbers. Different random number sequences are needed in order to run
the simulation several times for different results.
Deliverable 1:
List the two sets (seed1 and seed 2) of time series (i; ri; ti) in tables."
The code I have been able to come up with till now was as so: