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 (..)
|