I am using CodeBlocks c++ compiler.
I want to generate 11 digit random number as i am working on my computer project.
How can i do this? and everytime a new random number.
himgar
-4
Light Poster
Recommended Answers
Jump to PostA little searching will always help. There is already a thread for this.
Just use the code it shows there for generating a random number between a range, and use a range of 10000000000 to 99999999999.
Jump to Post1) Seed random number
2) use rand()/RAND_MAX * (max-min) + min;
Jump to Post1) Seed random number
2) use rand()/RAND_MAX * (max-min) + min;
Jump to PostA little searching will always help. There is already a thread for this.
Just use the code it shows there for generating a random number between a range, and use a range of 10000000000 to 99999999999.
1) Seed random number
2) use rand()/RAND_MAX * (max-min) + min;On 32 bit …
All 13 Replies

Rkeast
mrnutty
761
Senior Poster
mrnutty
761
Senior Poster
Tom Gunn
1,164
Practically a Master Poster
mrnutty
761
Senior Poster
Tom Gunn
1,164
Practically a Master Poster
mrnutty
761
Senior Poster
Tom Gunn
1,164
Practically a Master Poster
mrnutty
761
Senior Poster
mrnutty
761
Senior Poster
Tom Gunn
1,164
Practically a Master Poster
mrnutty
761
Senior Poster
Acute
-2
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.