pointer
This commit is contained in:
@@ -8,6 +8,8 @@ int main(void)
|
||||
int alice = 0;
|
||||
int superAlice = 0;
|
||||
int notSuperBob = 0;
|
||||
int superBob = 0;
|
||||
int notSuperAlice = 0;
|
||||
srand(time(NULL));
|
||||
|
||||
for(int i = 0; i < 1000; ++i){
|
||||
@@ -23,16 +25,30 @@ int main(void)
|
||||
int tempDie = (die % 2) ? die - 1 : die;
|
||||
if(tempDie % 2){
|
||||
++notSuperBob;
|
||||
++superBob;
|
||||
} else {
|
||||
++superAlice;
|
||||
if(tempDie > 3) {
|
||||
++notSuperAlice;
|
||||
} else {
|
||||
++superBob;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
++notSuperBob;
|
||||
++superBob;
|
||||
++superAlice;
|
||||
}
|
||||
}
|
||||
|
||||
/* int bobtempDie = tempDie;
|
||||
if (tempDie < 4 && tempDie % 2 != 0) {
|
||||
bobtempDie = tempDie * 2;
|
||||
(bobtempDie % 2) ? ++superBob : ++notSuperAlice;
|
||||
printf("bobtempDie: %d\n", bobtempDie);
|
||||
}
|
||||
*/
|
||||
printf("Normal Alice: %d, Normal Bob: %d\n", alice, bob);
|
||||
printf("Super Alice: %d, NotSuperBob: %d\n", superAlice, notSuperBob);
|
||||
printf("Super Bob: %d, notSuperAlice: %d\n", superBob, notSuperAlice);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user