This is the archived website of SI 486H from the Spring 2016 semester. Feel free to browse around; you may also find more recent offerings at my teaching page.

Problem 27

Program to generate Lehmer LCG sequence

Due: February 2
Points: 2

Write a Java, C++, or Python program to generate the first 500 values from a Lehmer linear congruential generator. Your program should take in three integers on the command line, for the values of m, a, and the seed \(X_0\), in that order.

Submit your program according to the instructions on the submit page.