Question: all linear congruential generators use this formula: . r 0 is a seed . r 1 r 2 r 3 .... are the random numbers

all linear congruential generators use this formula:

. r0 is a seed

. r1 r2 r3 .... are the random numbers

.a c m are constant

Now that you studied LCG, Your job is to implement the LCG using the former formula

you will implement the LCG intwo ways

Task

FIRST WAY :Take a,c and m as arguments from user and generate the random numbers .

SECOND WAY:

Set a to214013Set c to 2531011Set m to 231

Third Compare your results

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!