4 digit lottery random generator

Oct 16, 2019 at 3:47pm
Hello,

I'm trying to create a random four digit lottery number generator that outputs five different 4 digit lottery numbers between 0000 and 9999.

Thank you
Oct 16, 2019 at 3:47pm
How far have you got?
Oct 16, 2019 at 4:11pm
Oct 16, 2019 at 11:00pm

Hi,

I havent got anywhere yet. Don't know where to start
Oct 17, 2019 at 12:07am
I havent got anywhere yet. Don't know where to start

Learn how to generate random numbers. Using the <stdlib.h> and <time.h> libraries if writing a C program, using <random> and <chrono> if creating a C++ program.

Write some code.

Simply (figuratively) throwing up your hands and saying you can't do it is not a good way to start.

Understanding a bit of theory on how to generate pseudo-random numbers in tutorial form might be helpful to get things going:

https://www.learncpp.com/cpp-tutorial/59-random-number-generation/
Topic archived. No new replies allowed.