Explore BrainMass

# Array sorting and finding values in Visual Basic

Not what you're looking for? Search our solutions OR ask your own Custom question.

This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

See the attached file.
I have a multi-dimensional array that needs to have the following questions answered each by a separate button and sub or function procedure.

The array is
Dim Kidsinsports(10,3) " schools + sports" e.g. School 1 has 10 kids in football, 10 in basketball and 10 in volleyball. Sports are organized by (Football, Basketball, Volleyball)

Dim costofsports(3,10) = equals to home much each individual school spent for Basketball, footbal, volleyball

Dim kidsinsports(,) As Integer = {{10, 10, 10}, {20, 10, 15}, {10, 5, 10}, {20, 20, 20}, {11, 10, 12}, {22, 10, 10}, {5, 0, 5}, {10, 12, 23}, {15, 3, 9}, {12, 17, 24}}

Dim costofsports(,) As Double = {{100, 200, 150, 120, 231, 102, 87, 145, 156, 130}, {100, 56, 78, 99, 105, 180, 230, 165, 134, 75}, {110, 120, 130, 140, 77, 120, 150, 150, 190, 200}}

1. Which school spent the most money on football
2. Which sport the last school spent the most money on
4. Which sport the third school had the most students participating
5. Total amount spent by call schools on volleyball
6. Total number of students who played any sport
7. Which school has the most students participating in sports
8. Which was the most popular sport in terms of money spent
9. Which was the most popular sport in terms of student participation
10. Total number of students playing basketball.