go to previous page   go to home page   go to next page hear noise

Answer:

Only one player will win. Each round always adds one point to just one player, so just one player will be the first to reach ten points


Main Loop

Here is the logic that implements the main loop:

  // Declare and Initialize
  final int endScore=10;

  int playerScore=0, compScore=0;
  
  // Play Rounds until one player reaches ending score
  while ( playerScore<endScore && compScore<endScore )
  {
    . . . .
  }
    

The body of the loop corresponds to one round of the game.


QUESTION 20:

(Review: ) What does final int endScore=10; do?