array problem that i need help with
The midville Park District maintains five soccer teams as shown in the table. Design a program that accepts a player's team name. Modify the Midville Park District program so that after the last player has been entered the program displays a count of the number of players registered for each team.
Team Number Team Name
1 Goal Getters
2 The Force
3 Top Guns
4 Shooting Stars
5 Midfield Monsters
ok so i am not sure how to put this into array form meaning is it Team Name that becomes an array or team number. Can someone do this problem so that i can see how it is done.This is what i have so far but i dont know if it it right.
string Team_name=Goal Getters,The Force,Top Guns,Shooting Stars,Midfield Monsters
display “enter team number”
While Team_number not quit
Display “enter Team_number
I am stuck after this point i dont know what to doooo!!!!!!!!! next or if i have to start over can someone write this so that i can get an idea of how it would be done.PLEASE!
Re: array problem that i need help with
I think you're going about this the wrong way. Your array will have five indexes, 0-4. Index 0 holds the count for the first team, index 4 holds the count for the last team. Increment the value at the appropriate index as names are entered. Then loop through and print them out.