DaniWeb Forum Index
>
Search Forums
RSS
Search Results
•
•
•
•
Showing results 1 to 1 of 1
Search took
0.01
seconds.
Search:
Posts Made By:
winkland
Save these search results for 24 hours
Forum:
C++
Mar 29th, 2005
Replies:
30
C++ Random Numbers
Views:
904,007
Posted By
winkland
Re: C++ Random Numbers
This may not be better, but it is shorter
for (int a=1; a<4; a++){
for(int b=1; b<4; b++){
slots[a][b] = rand()%9; OR slots[a][b]=( rand() *10 ) +1; //this assumes you wanted 1-10
...
Showing results 1 to 1 of 1
You need to
join our community
in order to build your list of favorite forums. You can visit the
forum index
for a listing of all forums.
Latest Posts
Today's Posts
All Forums
Unanswered Threads
All Forums
Related Forum Features
DaniWeb News Stories
DaniWeb Code Snippets
DaniWeb Tutorials
DaniWeb Product Reviews
DaniWeb White Papers
Forum Search
About Us
|
Contact Us
|
Advertise
|
DaniWeb
|
Acceptable Use Policy
|
©2003 - 2009 DaniWeb® LLC