Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 I don't get it!
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
DBZ




PostPosted: 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
Sponsor
sponsor
Mazer




PostPosted: 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




PostPosted: Fri Jan 16, 2004 3:45 pm   Post subject: (No subject)

i donno about returning though parameters part... Confused just make it a function Wink

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
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Mazer




PostPosted: Fri Jan 16, 2004 3:45 pm   Post subject: (No subject)

Haha, posted before ya tony Wink
Tony




PostPosted: Fri Jan 16, 2004 3:49 pm   Post subject: (No subject)

haha Laughing I could just delete your post and edit your text into my own Twisted Evil
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Mazer




PostPosted: 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? Shocked
shorthair




PostPosted: 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




PostPosted: 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
Sponsor
sponsor
Andy




PostPosted: Sat Jan 17, 2004 7:13 pm   Post subject: (No subject)

DBZ ur a dumbass
-20 bits
DBZ




PostPosted: 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




PostPosted: 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




PostPosted: Sat Jan 17, 2004 7:19 pm   Post subject: (No subject)

How is that stupid? U wanna explain?
Andy




PostPosted: 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




PostPosted: Sat Jan 17, 2004 7:25 pm   Post subject: (No subject)

dodge_tomahawk wrote:
DBZ ur a dumbass


agreed!

(not to flame or anything)
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 14 Posts ]
Jump to:   


Style:  
Search: