Author |
Message |
DBZ
|
Posted: 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. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Mazer
|
Posted: Fri Jan 16, 2004 3:45 pm Post subject: (No 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:
code: |
proc whatever (var x, y : int)
|
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. |
|
|
|
|
|
Tony
|
Posted: Fri Jan 16, 2004 3:45 pm Post subject: (No 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 |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
Mazer
|
Posted: Fri Jan 16, 2004 3:45 pm Post subject: (No subject) |
|
|
Haha, posted before ya tony |
|
|
|
|
|
Tony
|
Posted: Fri Jan 16, 2004 3:49 pm Post subject: (No subject) |
|
|
haha I could just delete your post and edit your text into my own |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
Mazer
|
Posted: Fri Jan 16, 2004 3:51 pm Post subject: (No subject) |
|
|
Sure you could, but you wouldn't do that to a friend now would you? Would you? |
|
|
|
|
|
shorthair
|
Posted: Sat Jan 17, 2004 6:26 pm Post subject: (No 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 |
|
|
|
|
|
DBZ
|
Posted: Sat Jan 17, 2004 7:11 pm Post subject: (No subject) |
|
|
i didn't label the thread "I need help"! I labeled it "I don't get it"! Think before u say anything! |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Andy
|
Posted: Sat Jan 17, 2004 7:13 pm Post subject: (No subject) |
|
|
DBZ ur a dumbass
-20 bits |
|
|
|
|
|
DBZ
|
Posted: Sat Jan 17, 2004 7:16 pm Post subject: (No subject) |
|
|
Heeey! why the hell r u calling me a dumbass? What did i do to u? |
|
|
|
|
|
Andy
|
Posted: Sat Jan 17, 2004 7:17 pm Post subject: (No 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 |
|
|
|
|
|
DBZ
|
Posted: Sat Jan 17, 2004 7:19 pm Post subject: (No subject) |
|
|
How is that stupid? U wanna explain? |
|
|
|
|
|
Andy
|
Posted: Sat Jan 17, 2004 7:20 pm Post subject: (No subject) |
|
|
read the rulz... the part where it says when ur asking for help, be specific in the topic name |
|
|
|
|
|
Cervantes
|
Posted: Sat Jan 17, 2004 7:25 pm Post subject: (No subject) |
|
|
dodge_tomahawk wrote: DBZ ur a dumbass
agreed!
(not to flame or anything) |
|
|
|
|
|
|