
-----------------------------------
Chris
Wed Mar 01, 2006 6:58 pm

Random integer
-----------------------------------
I need to know how to create a random integer of 1,2, or 3. Thanks in advance for the help

-----------------------------------
md
Wed Mar 01, 2006 6:59 pm


-----------------------------------
google rand, srand, and modulus. Together those will solve your random number needs.

-----------------------------------
Chris
Wed Mar 01, 2006 7:02 pm


-----------------------------------
google rand, srand, and modulus. Together those will solve your random number needs.could you just give me the awnser instead of saying "look it up"?

-----------------------------------
[Gandalf]
Wed Mar 01, 2006 7:25 pm


-----------------------------------
I guess not...  But there is an alternative!  You could use the [url=http://www.compsci.ca/v2/search.php]search button and find the answer for yourself, since I know it's already there.

-----------------------------------
md
Thu Mar 02, 2006 12:40 am


-----------------------------------

srand(SOME_RANDOM_SEED);
int k = (rand() % (HIGH-LOW))+LOW;


There, happy? If I give you the code how does it help you learn though?

-----------------------------------
wtd
Thu Mar 02, 2006 12:44 am


-----------------------------------
Silly, silly cornflake... everyone knows you're only learning when you get high grades.  If he gets a high gradfe because of that, then he must have learned something from it.

-----------------------------------
md
Thu Mar 02, 2006 1:12 am


-----------------------------------
Oh, of course! How silly of me! Because we all know that grades are the end all be all, and that doing supremely well in high school is the most important thing ever! ;)

-----------------------------------
rizzix
Thu Mar 02, 2006 1:56 pm


-----------------------------------
we do?  :?

-----------------------------------
bugzpodder
Thu Mar 02, 2006 2:11 pm


-----------------------------------
Oh, of course! How silly of me! Because we all know that grades are the end all be all, and that doing supremely well in high school is the most important thing ever! ;)

silly silly Cornflake...  do I need to remind you of our CS134 project?

-----------------------------------
md
Thu Mar 02, 2006 6:40 pm


-----------------------------------
The which wha who? IIRC I only worked on one project with others...

-----------------------------------
MysticVegeta
Thu Mar 02, 2006 6:53 pm


-----------------------------------
Oh, of course! How silly of me! Because we all know that grades are the end all be all, and that doing supremely well in high school is the most important thing ever! ;)

silly silly Cornflake...  do I need to remind you of our CS134 project?
LOL

-----------------------------------
Justin_
Thu Mar 02, 2006 11:30 pm


-----------------------------------
Photoshop is a very intimidating application; I'd die at an early age if I had to program it.  But, I'm sure i'll get better at making sigs.

-----------------------------------
[Gandalf]
Thu Mar 02, 2006 11:49 pm


-----------------------------------
Although I would have to agree... What..?

This is your second strangely off-topic post, you sure everything is...  ok?

-----------------------------------
Justin_
Fri Mar 03, 2006 12:04 am


-----------------------------------
I needed to see my new siggy in action so I targeted a B.S. thread to say my B.S.

-----------------------------------
[Gandalf]
Fri Mar 03, 2006 12:20 am


-----------------------------------
Ah.  Good reason.  Although you could have just previewed your post, and not posted it.

In that case, you may be interested to know that we do not see your signature, we see:
http://img47.imageshack.us/img47/5066/screenshot12ak.jpg

-----------------------------------
Justin_
Fri Mar 03, 2006 12:25 am


-----------------------------------
really?  Thats kind of wierd, I can see it  :x   hmmm...

-----------------------------------
bugzpodder
Fri Mar 03, 2006 2:46 pm


-----------------------------------
The which wha who? IIRC I only worked on one project with others...

The Queue one that you didn't  do, so you begged Martin to join our group in order to earn those precious marks...  in the end messes up a half page documentation, and made no effort to submit before the deadline...  I asked you five minutes before the deadline if you had submitted or not... shocked to hear no, and had to run up two floors to a UNIX lab to get it in time.  Almost lost 5% of my final mark there.

-----------------------------------
md
Fri Mar 03, 2006 4:40 pm


-----------------------------------
BS thread? This thread isn't BS at all! It's about random varaibles. Such brilliance you display.

-----------------------------------
Justin_
Fri Mar 03, 2006 7:22 pm


-----------------------------------
Can we see my avator now?  I had no idea how to make one, and first day with photo shop, but i think its okay.

-----------------------------------
md
Fri Mar 03, 2006 9:26 pm


-----------------------------------
The which wha who? IIRC I only worked on one project with others...

The Queue one that you didn't  do, so you begged Martin to join our group in order to earn those precious marks...  in the end messes up a half page documentation, and made no effort to submit before the deadline...  I asked you five minutes before the deadline if you had submitted or not... shocked to hear no, and had to run up two floors to a UNIX lab to get it in time.  Almost lost 5% of my final mark there.

Ahh; I actually did make an effort, though it didn't work. And the submitting thing was an issue related to system stuff, not that I didn't put in the effort. Good of you to remember though. ;) Oh, and the original post was just oozing sarcasm.

Justin: Yes it's there. Horrible, ugly, mostrosity that it is. Now please get rid of it and stop posting in this thread unless it relates to people asking questions instead of searching anf RTFM'ing; or random variables.

-----------------------------------
Justin_
Fri Mar 03, 2006 10:19 pm


-----------------------------------
:shock:  I like it.

-----------------------------------
[Gandalf]
Sat Mar 04, 2006 7:57 am


-----------------------------------
Make your signature smaller, and take out the useless black space.  And stop spamming. http://img131.imageshack.us/img131/9987/smilie19cc.gif
*Yes, I am an amazing smilie creator :)
**Yes, spamming is bad.

-----------------------------------
Justin_
Sat Mar 04, 2006 2:02 pm


-----------------------------------
it is a 36.9 kb image.  Isn't that small enough?

-----------------------------------
[Gandalf]
Sat Mar 04, 2006 2:09 pm


-----------------------------------
Physical size.  Resolution.  :roll:
