Computer Science Canada

Random integer

Author:  Chris [ Wed Mar 01, 2006 6:58 pm ]
Post subject:  Random integer

I need to know how to create a random integer of 1,2, or 3. Thanks in advance for the help

Author:  md [ Wed Mar 01, 2006 6:59 pm ]
Post subject: 

google rand, srand, and modulus. Together those will solve your random number needs.

Author:  Chris [ Wed Mar 01, 2006 7:02 pm ]
Post subject: 

Cornflake wrote:
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"?

Author:  [Gandalf] [ Wed Mar 01, 2006 7:25 pm ]
Post subject: 

I guess not... But there is an alternative! You could use the search button and find the answer for yourself, since I know it's already there.

Author:  md [ Thu Mar 02, 2006 12:40 am ]
Post subject: 

c++:

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?

Author:  wtd [ Thu Mar 02, 2006 12:44 am ]
Post subject: 

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.

Author:  md [ Thu Mar 02, 2006 1:12 am ]
Post subject: 

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! Wink

Author:  rizzix [ Thu Mar 02, 2006 1:56 pm ]
Post subject: 

we do? Confused

Author:  bugzpodder [ Thu Mar 02, 2006 2:11 pm ]
Post subject: 

Cornflake wrote:
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! Wink


silly silly Cornflake... do I need to remind you of our CS134 project?

Author:  md [ Thu Mar 02, 2006 6:40 pm ]
Post subject: 

The which wha who? IIRC I only worked on one project with others...

Author:  MysticVegeta [ Thu Mar 02, 2006 6:53 pm ]
Post subject: 

bugzpodder wrote:
Cornflake wrote:
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! Wink


silly silly Cornflake... do I need to remind you of our CS134 project?

LOL

Author:  Justin_ [ Thu Mar 02, 2006 11:30 pm ]
Post subject: 

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.

Author:  [Gandalf] [ Thu Mar 02, 2006 11:49 pm ]
Post subject: 

Although I would have to agree... What..?

This is your second strangely off-topic post, you sure everything is... ok?

Author:  Justin_ [ Fri Mar 03, 2006 12:04 am ]
Post subject: 

I needed to see my new siggy in action so I targeted a B.S. thread to say my B.S.

Author:  [Gandalf] [ Fri Mar 03, 2006 12:20 am ]
Post subject: 

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:
Posted Image, might have been reduced in size. Click Image to view fullscreen.

Author:  Justin_ [ Fri Mar 03, 2006 12:25 am ]
Post subject: 

really? Thats kind of wierd, I can see it Mad hmmm...

Author:  bugzpodder [ Fri Mar 03, 2006 2:46 pm ]
Post subject: 

Cornflake wrote:
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.

Author:  md [ Fri Mar 03, 2006 4:40 pm ]
Post subject: 

BS thread? This thread isn't BS at all! It's about random varaibles. Such brilliance you display.

Author:  Justin_ [ Fri Mar 03, 2006 7:22 pm ]
Post subject: 

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.

Author:  md [ Fri Mar 03, 2006 9:26 pm ]
Post subject: 

bugzpodder wrote:
Cornflake wrote:
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. Wink 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.

Author:  Justin_ [ Fri Mar 03, 2006 10:19 pm ]
Post subject: 

Shocked I like it.

Author:  [Gandalf] [ Sat Mar 04, 2006 7:57 am ]
Post subject: 

Make your signature smaller, and take out the useless black space. And stop spamming. Posted Image, might have been reduced in size. Click Image to view fullscreen.
*Yes, I am an amazing smilie creator :)
**Yes, spamming is bad.

Author:  Justin_ [ Sat Mar 04, 2006 2:02 pm ]
Post subject: 

it is a 36.9 kb image. Isn't that small enough?

Author:  [Gandalf] [ Sat Mar 04, 2006 2:09 pm ]
Post subject: 

Physical size. Resolution. Rolling Eyes


: