posted 5 years ago
Hi everyone,
I would really appreciate some help here.
What I am trying to achieve is to create a simple program that guesses a number from 1 - 15 (which I have done and works).
What I then wanted to do is include some code that reads from and writes to an array. This array includes information about the players, for example;
1. How many players are going to play the game and then reference to how old each player is.
This is purely to demonstrate the use of arrays so even though it doesn't really seem "functional", it will help to understand how it can be used.
So far I have been abler to create the array, but can't seem to work out how to put it all together so the Player 1 and matching age can then be displayed back to the user at the end of the input phase.
It should do the following
1. How many users will play
2. Input how old in years each user is
3. Display back to the user each player number / age ("Player 1 is 42 years old", Player 2 is 18 years old" and so on.
4. Then asks for player names
5. Game begins and goes through the while loop and ends