### Need assistance with my Functions!!!

Struggling with this, can't seem to get it to work. Here is what I need to do:
1. Ask the user how many weeks were in the landscaping season this year.
2. Dynamically create an array of double floating point data that can be used to store the sales for each week of the season.
3. Using a for loop, have the user enter in the sales data for the season.
4. Pass the array (and its size) into a function that will display all the sales for the weeks in a nice table.
5. Call another function that will take in the array as an argument and will total the sales for the season (returning the total to the main function).
6. Have the program tell the user the total sales for the season and the average sales per week.
7. After this delete the allocated memory and set the pointer to 0.

Any assistance helps always I don't quite understand functions, or pointers. and I've read about both a lot!!

 ``123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051`` `````` #include #include using namespace std; int Weeks = 0; double total; double sales; void SalesTable(int); double Total (int, double[]); double average; int main() { double Season[Weeks]; cout << "How many weeks were in the landscaping season this year: "; cin >> Weeks; for (int i = 1; i> sales; } Season[Weeks]=sales; SalesTable(Weeks); Total(Weeks, Season); average = total/Weeks; cout << "The total sales for the season are: "<
Topic archived. No new replies allowed.