Custom Random Number Generator

A simple implementation of a random number generator built from scratch in Java, using the Linear Congruential Generator (LCG) algorithm. This project demonstrates how to create pseudo-random numbers without relying on built-in libraries.

Features

  • Custom random number generation using the LCG algorithm.
  • Configurable seed for reproducibility or automatic seeding with the current time.
  • Support for generating random numbers within a specified range.

How It Works

The generator uses the following formula: seed = (a * seed + c) % m

Where:

  • a is the multiplier.
  • c is the increment.
  • m is the modulus.

These parameters ensure the randomness properties of the generated numbers.

Built With

Share this project:

Updates