Player1 and player2 a simple game

i was wondering if i could get help with this assingment due tomorrow —i was asked to write a small program that has player one and player two and each player picks a number from an array of given numbers and then the numbers each player picks is then added together and whoever has the bigger number wins

We aren’t going to spoonfeed you your assignment. Please show us the code you have tried so far.

1 Like

So many questions:

  1. Are the numbers picked randomly?

  2. Can the same number(element) be re-used by a different player or once a number is chosen, can it no longer be used?

  3. Why don’t you walk us through an example array and how the game would be played out between the two players?. At the end, you would show us which player is the winner based on which one has the highest sum.