Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
random-number
- Page 1
Re: Java Coin Flip Program
Programming
Software Development
6 Days Ago
by jassonadder
… result, and then shows the totals at the end: import
random
class CoinFlipper: def __init__(self): self.heads = 0 self.…def flipCoin(self, times): for i in range(times): flip =
random
.choice(['Heads', 'Tails']) print(f"Flip {i+1}: {flip…
Re: Cannot run exe from asp.net
Programming
Web Development
2 Weeks Ago
by Neil_brown001
… how IIS reads settings versus Visual Studio. Why the port
number
is different When you run your site in Visual Studio… development web server (Kestrel or IIS Express), which picks a
random
port. In production, IIS will usually use port 80 or…
Re: Cannot run exe from asp.net
Programming
Web Development
2 Weeks Ago
by lennyli
… reads settings versus Visual Studio. > > Why the port
number
is different > When you run your site in Visual… development web server (Kestrel or IIS Express), which picks a
random
port. In production, IIS will usually use port 80 or…
Random number and Mode
Programming
Software Development
11 Years Ago
by chubbyy.putto
Random
Number
: Whenever I run it show me an error. …unsigned int) time(NULL) );` it run but it seem the
number
is not change at all. void read_array (int read[] , … array { again++; cout <<"This is
number
" << again << endl; } }
Random number functions
Programming
Software Development
15 Years Ago
by mrnutty
Random
number
generator under its own namespace. Its a sample program.
Re: Random number generation
Programming
Software Development
20 Years Ago
by FireNet
Random
Number
generation is easy but when you call rand() you only get a
number
from an array.To get true
random
numbers you have to seed that array using srand(); call srand(GetTickCount());Then you start getting
random
numbers.
Re: Random Number Generator with MinGW and Boost
Programming
7 Years Ago
by rubberman
Random
number
generators is a "mature" science. This may help you understand the subject matter: http://www.phy.ornl.gov/csep/CSEP/RN/RN.html
Random Number help
Programming
Software Development
20 Years Ago
by Jason Marceau
…System.in)); int num;
Random
rand = new
Random
(); System.out.print("Enter a
number
to choose a
random
number
from: "); num =…
random
number
is: " + result); } } [/code] Here's a sample run: [code] Enter a
number
to choose a
random
number
from: 100 The
random
number
…
random number
Programming
Software Development
18 Years Ago
by civil1
…patel i have problem related to
random
number
genre. ter . i don't understand from which is
number
from i have to start…104. 3d: Subtract this result from the
number
produced by step 2. Use this
random
number
as the new seed. Step 4: Repeat… each extract one of the 4 digits to produce a
random
number
of 0-9. Start by initialising 10 variables, used …
Re: random number
Programming
Software Development
18 Years Ago
by Aia
… try to produce a ramdom
number
. [code]
random
= rand() % 9;[/code] will assign to variable
random
the result of the evaluation … use it. To imitate the chaos needed for a
random
number
you need to use the function srand() before using … a base for that chaos needed to originate a pseudo-
random
number
. Here's a link for example. [URL]http://www…
Re: random number
Programming
Software Development
18 Years Ago
by civil1
… try to produce a ramdom
number
. [code]
random
= rand() % 9;[/code] will assign to variable
random
the result of the evaluation… use it. To imitate the chaos needed for a
random
number
you need to use the function srand() before using …a base for that chaos needed to originate a pseudo-
random
number
. Here's a link for example. [URL]http://www…
Re: random number
Programming
Software Development
18 Years Ago
by civil1
…lt;"\n"<<"how many
random
number
will the program generat:"<< counter<…quot;\n"<< setw(4) <<"
random
number
"<< setw(4) << "… know that,how to count every integer in each
random
line? means,[code] randomnumber count percent 0 12…
Re: Random number
Programming
Software Development
11 Years Ago
by DavidB
…as I know, it is presently the best pseudo-
random
number
generator available. It has an extremely long period …://www.daniweb.com/software-development/cpp/threads/311641/
random
-
number
-generator There is also a web service that provides…which they use to sample atmospheric noise and generate
random
numbers. Depending upon your needs, you can specify …
Random Number
Programming
Software Development
18 Years Ago
by Matt Tacular
… was just wondering how to get a variable assigned a
random
number
within a certain range. I tried the rand, but I… everytime I run the code... I did some research on
random
numbers in C++ and understand the whole pourpose of seeding…
random
generation, but couldn't find anywhere that just gives me…
Re: random number
Programming
Software Development
14 Years Ago
by NormR1
Are you saying that you got the same
random
number
two times in a row? That is possible. For example …when you flip a coin, it is
random
that it will be heads or tails. It can be…
Re: Random Number
Programming
Software Development
18 Years Ago
by Ancient Dragon
srand() seeds the
random
number
generator, you should call srand() one time only and near the top of main(). Most of us use the time() function as the paramter to srand() [code] int main() { srand(time(0)); } [/code]
random number
Programming
Software Development
14 Years Ago
by shahreza
i got a question about
random
number
.. this is my sample data : jenny jason …- 140.. i wanna take all name to put within that
number
. and it need to be fair.. as example, if we… got alex to fill first
number
, then we cant put him again for next 14…
number
.. but he can be place again starting …
random number
Programming
Software Development
15 Years Ago
by timbomo
i am having a problem getting a
random
number
1-6 on an invisible dice and storing the
number
. i get this error |error…
Re: random number
Programming
Software Development
14 Years Ago
by NormR1
[QUOTE]is there any way i can solve this?[/QUOTE] Yes, you could solve that problem by writing a java program. [QUOTE]i got a question about
random
number
[/QUOTE] What is your question? Please be more specific that just stating the problem/assignment description.
Re: Random number
Programming
Software Development
11 Years Ago
by rubberman
Myself, I like lagged-fibonacci sequences, salted with some really
random
variables such as the decay of some radioactive isotopes, the … and uses Monte Carlo routines to model elemenatary physics. Really
random
number
generators are essential in that work.
Re: Random number
Programming
Software Development
12 Years Ago
by np complete
> x = lo + rand() % (hi - lo) This gives
random
number
between hi and lo ( if 1 and 4 are given, then either 1, 2, 3 are displayed. But my question is, if 1 and 3 are given then I want to display either 1 or 3, no
number
between them.
Random number.
Programming
Software Development
14 Years Ago
by Danny_501
Hi all, I need to get a
random
number
from the following: [CODE]#define RAND(min,max) ((min)+(int)((double)(max-min+1)*rand()/(RAND_MAX+1.0)))[/CODE] but when I print it out it just prints the value of min. [CODE]printf("%d", RAND(10000000,99999999));[/CODE] please help! thanks in advance.
Random number
Programming
Software Development
12 Years Ago
by np complete
How can I make my program generate
random
number
between two given integers ? I use `srand ( time(NULL) );` `x = rand() % i;` to generate numbers modulo i. But I can't figure out how to generate between two numbers, suppose 1 and 3.
Random number
Programming
Software Development
11 Years Ago
by chubbyy.putto
can anyone tell what did i wrong on this
random
number
? http://pastebin.com/M3J9u5sR
Re: Random number
Programming
Software Development
11 Years Ago
by chubbyy.putto
…; index++) { read[index] = (rand() % 30) + 1; // This will create 200
random
number
. } output is 1-2-5-5-6-7-8-8…
Re: Random number and Mode
Programming
Software Development
11 Years Ago
by chubbyy.putto
I need help with
random
number
: Everytime i run it the
number
look like doesnt change at all. Here are one of the output 0-2-2-4-5-6-7-10-10-12 12-12-13-14-15-15-16-18-18-19 21-23-23-24-24-24-25-26-29-29
Random Number Generation
Programming
Software Development
12 Years Ago
by PseudoGuard
…a function named generateRandom that generates a single
random
number
in a range specified by the user.… However, my code prints out the same
number
instead of a
random
number
each time. #include <iostream>…quot;Please enter the lower and upper bounds for the
random
number
: " << endl; generateRandom(Lower_Bound,Upper_Bound…
Re: Random Number Generation
Programming
Software Development
12 Years Ago
by WaltP
…to write a function named generateRandom that generates a single
random
number
in a range specified by the user. Look at … the user for an integer with which to seed the
random
number
generator. Call srand with this integer. > 2) …lower and upper bound for the
random
number
. > 3) Asking the user how many
random
numbers to generate Did you do…
Random number generator with seed
Programming
Software Development
12 Years Ago
by Violet_82
… { public static void main( String[] args ) {
Random
randomNumbers = new
Random
(); //
random
number
generator int face; // stores each
random
integer generated // loop 20 times for ( int…
Re: Random number generator with seed
Programming
Software Development
12 Years Ago
by tux4life
…6/docs/api/java/util/
Random
.html)) ***This is a linear congruential pseudorandom
number
generator**, as defined by…calling the no argument constructor of
Random
. It will seed the
random
number
generator automagically to a value that…: *Creates a new
random
number
generator. **This constructor sets the seed of the
random
number
generator to a value …
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC