Purchase Solution

Array sorting and finding values in Visual Basic

Not what you're looking for?

Ask Custom Question

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
3. Which school had the most kids playing basketball
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.

Attachments
Purchase this Solution

Solution Summary

The solution provides sample codes of sorting array in Bisual Basic.

Purchase this Solution


Free BrainMass Quizzes
Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

Javscript Basics

Quiz on basics of javascript programming language.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.