The local high school sports boosters are conducting a fund drive to help raise money for the athletic program. As each donation is recieved, the person's name and amount of donation are entered on one line in a data file. Write a program to
a. print an alphabetical list of all donars together with their correspoding donation
b. print a list from highest to lowest with the donars' names
c. compute and print the average and total of all donations

• : The local high school sports boosters are conducting a fund drive to help raise money for the athletic program. As each donation is recieved, the person's name and amount of donation are entered on one line in a data file. Write a program to
: a. print an alphabetical list of all donars together with their correspoding donation
: b. print a list from highest to lowest with the donars' names
: c. compute and print the average and total of all donations
:
:

Well, to start with you are going to need to load the data from the file into an [b]array[/b]. The array should be of a customized [b]record[/b] type that defines two variables: [b]Name : String[/b] and [b]Donation : Real[/b]. The array size will be determined by the maximum number of donations.

Next, you need to create a menu and ask the user to choose which option they wish to see. Some simple [b]writeln()[/b] procedures followed by a [b]readkey[/b] call should accomplish this.
The result of the [b]readkey[/b] call should then call the corresponding procedure by using [b]if...then[/b] statements or a [b]case[/b] statement.

Then each procedure will have to sort the data or average it out as required and show the result.

Try to write the code and if you get stuck, post what you wrote. You won't learn if you don't try yourself, but we are more than happy to help you along.

Phat Nat