My programs asks for number of players and captures the input as integer number. Now for each player the system asks the user, how many times to bat. User can enter any integer. And for each bat I need to capture runs scored so that I can later calculate batting average and slugging average.
Now I needed to store this in a 2d array. Player #1 bats 3 times and scores 0, 1, 4. Player #2 bats 5 times and scores 1, 1, 0, 3, 4.
{0, 1, 4}
{1, 1, 0, 3, 4}
I'm struggling on how to create such an array.