create an algorithm, flowchart, and pseudocode for a solution of the following problem. This solution will include the use of arrays needed to complete all parts of the logic.

You have requested to develop a program that will record and process the rainfall totals of a 12 month period. You would use an array to store each months total. Once all 12 months amounts are entered then your solution need to process this array to complete the following requirements:

The user wants to know the total rainfall for the year.
Then you will need to calculate the average monthly rainfall
You will then need to find the month with the most rainfall and the month with the least amount of rainfall

Algorithm:

1. Create an array named "rainfall" with a size of 12 to store the rainfall totals for each month.
2. Initialize variables "totalRainfall" and "highestRainfall" with 0, and "lowestRainfall" with a very large value.
3. Read the rainfall total for each month and store it in the "rainfall" array.
4. Calculate the total rainfall for the year by summing up all the elements in the "rainfall" array and store it in the variable "totalRainfall".
5. Calculate the average monthly rainfall by dividing the "totalRainfall" by 12 and store it in the variable "averageRainfall".
6. Initialize variables "highestMonth" and "lowestMonth" with 0.
7. Iterate through the "rainfall" array using a loop:
a. If the current element is greater than the value of "highestRainfall":
- Update "highestRainfall" with the current element.
- Update "highestMonth" with the index (month number) of the current element.
b. If the current element is less than the value of "lowestRainfall":
- Update "lowestRainfall" with the current element.
- Update "lowestMonth" with the index (month number) of the current element.
8. Display the "totalRainfall", "averageRainfall", "highestRainfall", "lowestRainfall", "highestMonth", and "lowestMonth" to the user.

Flowchart:
┌───────────────┐
│ Start Program │
└───────────────┘


┌───────────────┐
│ Read Input │
└───────────────┘


┌───────────────┐
│ Initialize │
└───────────────┘


┌─────────────────────┐
│ Calculate Total │
│ Rainfall │
└─────────────────────┘


┌─────────────────────┐
│ Calculate Average │
│ Monthly Rainfall │
└─────────────────────┘


┌───────────────────────┐
│ Find Month with Most │
│ and Least Rainfall │
└───────────────────────┘


┌───────────────────────┐
│ Display Output │
└───────────────────────┘


┌───────────────┐
│ End Program │
└───────────────┘

Pseudocode:

1. Declare an array rainfall[12] of size 12
2. Set totalRainfall = 0, highestRainfall = 0, lowestRainfall = very large value
3. Read and store the rainfall total for each month in the rainfall array
4. For each element in rainfall:
- Add the element's value to totalRainfall
- If the element is greater than highestRainfall, update highestRainfall and set highestMonth to the index of the current element
- If the element is less than lowestRainfall, update lowestRainfall and set lowestMonth to the index of the current element
5. Calculate averageRainfall = totalRainfall / 12
6. Display totalRainfall, averageRainfall, highestRainfall, lowestRainfall, highestMonth, lowestMonth to the user