View Single Post
  #59  
Old 09-05-2007, 08:35 PM
mykey1961 mykey1961 is offline
Senior Member
 
Join Date: Oct 2005
Posts: 249
Default Re: Heads Up Game Theory exercise

[ QUOTE ]
[ QUOTE ]
I think you have a problem with these lines.
c1 = c2 = rand() assigns the same rand to both c1 and c2


[/ QUOTE ]
That is intentional, it basically just saves a line, because the while loop will continue to regenerate c2 until it is *not* equal to c1.

and do..until is not part of C or C++, which is what that code is.

Give me just a *little* bit of credit here, huh? Programming is how I make my living. And the code I posted was *extremely* basic. I do understand how while loops work.

[img]/images/graemlins/smile.gif[/img]

[/ QUOTE ]


my bad,
my eyes didn't see the while (..) in the second line.
my eyes saw an if (..)
Reply With Quote