Sunday, July 26, 2009

How can I create a random number generator??

I'm using Visual C++ Express Edition to write the code, and am doing assembly language programming. I need to create a program that will print 50 random numbers that are in the interval -20 to +20. I'm using x86 intel processor, with Windows Vista. Please someone solve this problem for me because I just can't figure it out.

How can I create a random number generator??
Stick all the numbers in a single container.Preferably round roll round several times to insure a good mix.Go to the street pick a stranger and ask them to remove a number and that willbe selected randomly.
Reply:i aint doin no programming fo u
Reply:Include the "cstdlib" so you can use the "rand" and "srand" functions which are written for this purpose.





Take a look at http://www.cprogramming.com/tutorial/ran... for more info on using this.


No comments:

Post a Comment