Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Coin Toss

Author
Message
Goonj
15
Years of Service
User Offline
Joined: 21st Sep 2009
Location:
Posted: 10th Nov 2009 23:47
write a function named coinToss that returns a random number in the range of 0 through 1. Demonstrate the function in a program that stimulates the tossing of a coin. The program should wait for the user to press a key, and then call the coinToss function.If the function returns 0, the program should display the image of a coin with head facing uo.If the function returns 1, the program should display the image of a coin with tails up.

goonj
puppyofkosh
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location:
Posted: 11th Nov 2009 00:19
Is this your homework or something?
Goonj
15
Years of Service
User Offline
Joined: 21st Sep 2009
Location:
Posted: 11th Nov 2009 00:29
umm..yes i know it sounds weird to post everything here like this..but i really need hints... which i cnt get anywhere else..sorry

goonj
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 11th Nov 2009 16:19
It's bit of a general programming question for the intent of this forum. I'd highly recommend checking out http://gamedev.net and explore their forums there. There's a lot of good information already in place and registered users are free to ask questions that haven't already been addressed.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 11th Nov 2009 21:19 Edited at: 11th Nov 2009 21:20
Or else you just look up the Dark GDK help for dbRND and dbRandomize and your problem is instantly solved. You would have found these functions pretty easily by typing "random" into the search of the help.

Login to post a reply

Server time is: 2024-11-20 11:38:42
Your offset time is: 2024-11-20 11:38:42