How Can i do this with out using an if statement?
Hint please
Hint please
Code:
while (roll <= 3600) {
int i = roll2Dice();
if (i == 3) count[3] = count[3] + 1;
if (i == 5) count[5] = count[5] + 1;
if (i == 7) count[7] = count[7] + 1;
if (i == 9) count[9] = count[9] + 1;
if (i == 11) count[11] = count[11] + 1;
roll = roll + 1;
}
Comment