How can i print this right?
<p>This simple program asks for the number of players,their names and (in the last for) it counts their score.But I dont know why it doen't go to the next player.Look at my code:</p>

<pre><code>    Scanner scanner = new Scanner(System.in);
    HashMap&lt;String,Integer&gt; players= new HashMap&lt;String,Integer&gt;();

    System.out.printf("Give the number of the players: ");
    int numOfPlayers = scanner.nextInt();

    for(int k=1;k&lt;=numOfPlayers;k++)
    {
        System.out.printf("Give the name of player %d: ",k);
        String nameOfPlayer= scanner.next();
        players.put(nameOfPlayer,0);//score=0
    }

    //This for finally returns the score 
    for(String name:players.keySet())
    { 
      int k=1;
      do{ 
          System.out.println("Name of player in this round: "+name);
           System.out.printf("Give me your word: ");
           String nameOfWord= scanner.next();

          //::::::::::::::::::::::
          //::::::::::::::::::::::

          int score=players.get(name)+10;
          //This will update the corresponding entry in HashMap
          players.put(name,score);
          System.out.println("The Player "+name+" has "+players.get(name)+" points ");
    }while(k&gt;0);
}
}  }
</code></pre>

<p>This returns: </p>

<pre><code> Give the number of the players: 2
 Give the name of player 1: A
 Give the name of player 2: B
 Name of player in this round: A
 Give me your word: ABC
 The Player A has 10 points 
 Name of player in this round: A
 Give me your word:......
........
</code></pre>

<p>but i want after it counts the score for 'A' to count the score for 'B'.How can i do this?What am i doing wrong? </p>
