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:

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

Algorithm:

Step 1: Initialize an array named "rainfall" with size 12 to store the rainfall totals for each month.
Step 2: Initialize variables "totalRainfall", "averageRainfall", "maxRainfall", and "minRainfall" with initial values of 0.
Step 3: Use a loop to iterate through each month (i from 0 to 11):
a. Prompt the user to enter the rainfall total for the ith month.
b. Read and store the input value in the "rainfall" array at index i.
c. Update the "totalRainfall" variable by adding the current rainfall total.
d. If the current rainfall total is greater than "maxRainfall", update "maxRainfall" and store the index of the month with the most rainfall.
e. If the current rainfall total is less than "minRainfall", update "minRainfall" and store the index of the month with the least rainfall.
Step 4: Calculate the average rainfall by dividing the "totalRainfall" by 12 and store the result in "averageRainfall".
Step 5: Output the "totalRainfall", "averageRainfall", and the name of the months with the most and least rainfall.

Flowchart:
```
start
Initialize variables
Initialize "rainfall" array

for i = 0 to 11
prompt user for rainfall input
store input in "rainfall" array
update totalRainfall
check for max and min rainfall

calculate average rainfall

output totalRainfall
output averageRainfall
output month with max rainfall
output month with min rainfall
end
```

Pseudocode:
```
totalRainfall = 0
averageRainfall = 0
maxRainfall = 0
minRainfall = INFINITY

initialize rainfall array with size 12

for i = 0 to 11
display "Enter rainfall for month " + (i+1) + ": "
read rainfall[i]
totalRainfall = totalRainfall + rainfall[i]

if rainfall[i] > maxRainfall
maxRainfall = rainfall[i]
maxIndex = i

if rainfall[i] < minRainfall
minRainfall = rainfall[i]
minIndex = i

averageRainfall = totalRainfall / 12

display "Total rainfall for the year: " + totalRainfall
display "Average monthly rainfall: " + averageRainfall
display "Month with most rainfall: " + (maxIndex+1)
display "Month with least rainfall: " + (minIndex+1)
```