Apr 12, 2007, 4:18 PM
Post #1 of 2
write a subroutine that generates pseudorandom numbers using the formula Xj+1 = AXj + C , modulus M, with X=2, C=3, M=4. Demonstrate the subroutine in a program that prompts the user for the "seed" Xo and then outputs on the screen a sequence of 50 pseudorandom numbers, one per line.
subroutine and random number generator
I have no idea how to go about the problem so any help would be much appreciated.