Linear Congruential Generator in C++