[Solved] Okay so I’m coding a roll the dice game on java


In your for loop:

  1. Remove the semicolon (;) just after the for(int rolls= 1; rolls==trials; rolls++) line.

  2. Change:

    for(int rolls= 1; rolls==trials; rolls++)
    

    to:

    for(int rolls= 1; rolls<=trials; rolls++)
    

As far as changing switch to ifelseif, 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