Computer Science Canada I don't get it! |
Author: | DBZ [ Fri Jan 16, 2004 2:01 pm ] |
Post subject: | I don't get it! |
Here is a program question which i don't understand! Please explain this question to me! 1. Write and test a procedure subprogram called card that randomly generatessuit and value of a card (for example, the jack of Hearts) and returns them through parameters. If you were any dumber, I would have deleted this topic instead of locking it, but I figured you would make another topic asking where this one went. Locked! Btw, -20 bits, for all the reasons down there. |
Author: | Mazer [ Fri Jan 16, 2004 3:45 pm ] | ||
Post subject: | |||
It's asking you to wriite a procedure that takes two parameters as variables (one for value, one for suit) and randomly give them values (ie, 1-13 for one, HDSC for the other). To make a procedure take it's parameters as variables (also known as by reference), make it like this:
This way, you can change the values of x and y, and when the procedure is done, the variabel you passed to it will be changed. |
Author: | Tony [ Fri Jan 16, 2004 3:45 pm ] |
Post subject: | |
i donno about returning though parameters part... just make it a function just return a value that represents a card. You can use two random functions to pick a value of the card and then the suit |
Author: | Mazer [ Fri Jan 16, 2004 3:45 pm ] |
Post subject: | |
Haha, posted before ya tony |
Author: | Tony [ Fri Jan 16, 2004 3:49 pm ] |
Post subject: | |
haha I could just delete your post and edit your text into my own |
Author: | Mazer [ Fri Jan 16, 2004 3:51 pm ] |
Post subject: | |
Sure you could, but you wouldn't do that to a friend now would you? Would you? |
Author: | shorthair [ Sat Jan 17, 2004 6:26 pm ] |
Post subject: | |
Why do people never learn , i mean your in the help forum so why call your thread i need help , I MEAN its i nteh help forum so obviously you need help , one day people might understand how to label a thread |
Author: | DBZ [ Sat Jan 17, 2004 7:11 pm ] |
Post subject: | |
i didn't label the thread "I need help"! I labeled it "I don't get it"! Think before u say anything! |
Author: | Andy [ Sat Jan 17, 2004 7:13 pm ] |
Post subject: | |
DBZ ur a dumbass -20 bits |
Author: | DBZ [ Sat Jan 17, 2004 7:16 pm ] |
Post subject: | |
Heeey! why the hell r u calling me a dumbass? What did i do to u? |
Author: | Andy [ Sat Jan 17, 2004 7:17 pm ] |
Post subject: | |
DBZ wrote: i didn't label the thread "I need help"! I labeled it "I don't get it"! Think before u say anything!
dont be stupid |
Author: | DBZ [ Sat Jan 17, 2004 7:19 pm ] |
Post subject: | |
How is that stupid? U wanna explain? |
Author: | Andy [ Sat Jan 17, 2004 7:20 pm ] |
Post subject: | |
read the rulz... the part where it says when ur asking for help, be specific in the topic name |
Author: | Cervantes [ Sat Jan 17, 2004 7:25 pm ] |
Post subject: | |
dodge_tomahawk wrote: DBZ ur a dumbass
agreed! (not to flame or anything) |