In your for loop:
-
Remove the semicolon (
;
) just after thefor(int rolls= 1; rolls==trials; rolls++)
line. -
Change:
for(int rolls= 1; rolls==trials; rolls++)
to:
for(int rolls= 1; rolls<=trials; rolls++)
As far as changing switch to if
–else
–if
, not sure why you would want to do this, but simply write it as:
if(face == 1){
one++;
}
else if(face ==2){
two++;
}
and so on..
2
solved Okay so I’m coding a roll the dice game on java