Money Money Money #1
Modify Program 10-19 (the United Cause case study program) so it can be used with any set of donations. The program should dynamically allocate the donations array and ask the user to input its values.
Program 10-19:
1 // This program shows the donations made to the United Cause
2 // by the employees of CK Graphics, Inc. It displays
3 // the donations in order from lowest to highest
4 // and in the original order they were received.
5 #include
6 #include "donlist.h"
7 using namespace std;
8
9 int main()
10 {
11 double funds[] = {5, 100, 5, 25, 10,
12 5, 25, 5, 5, 100,
13 10, 15, 10, 5, 10 };
14 DonationList ckGraphics(15, funds);
15 cout << "The donations sorted in ascending order are:\n";
16 ckGraphics.showSorted();
17 cout << "The donations in their original order are:\n";
18 ckGraphics.show();
19 return 0;
20 }
Program Output
The donations sorted in ascending order are:
5 5 5 5 5 5 10 10 10 10 15 25 25 100 100
The donations in their original order are:
5 100 5 25 10 5 25 5 5 100 10 15 10 5 10
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.