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.
So many questions:
Are the numbers picked randomly?
Can the same number(element) be re-used by a different player or once a number is chosen, can it no longer be used?
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.