need help writing the code to my array

I need help writing out the code for this array here can someone guide me through it
#include <iostream>

using namespace std;

// 2. Rainfall statistics
void RainfallStatistics()
{
// Allocate an array of doubles for the monthly rainfall
double monthlyRainfall[12];

// Allocate and initialize an array of months' names
char * monthNames[12] = {
"January", /* 0 */
"February", /* 1 */
"March", /* 2 */
"April", /* 3 */
"May", /* 4 */
"June", /* 5 */
"July", /* 6 */
"August", /* 7 */
"September",/* 8 */
"October", /* 9 */
"November", /* 10 */
"December" /* 11 */
};
// Write and use a function to prompt the user for 12 rainfalls
getMonthlyRainfall( monthlyRainfall );

// Write and use a function to calculate the sum of the rainfall
double totalRainfall =
calcTotalRainfall( monthlyRainfall );

// Determine the average monthly rainfall
double averageRainfall = totalRainfall / 12.0;

// Write and use a function to find the maximum rainfall
int maximumRainfallMonth = /* Jan=0, Feb=1, Mar=2, etc... */
findMaximumRainfallMonth( monthlyRainfall );

// Write and use a function to find the maximum rainfall
int minimumRainfallMonth = /* Jan=0, Feb=1, Mar=2, etc... */
findMinimumRainfallMonth( monthlyRainfall );

// Use std::cout to print out your results.
cout << "Total rainfall = " << totalRainfall << endl;
// etc...
cout << "The most rainfall occurred during ";
cout << monthNames[ maximumRainfallMonth ] << endl;
// etc...

}
Well, what you have so far looks ok. Which part do you need help with?
Topic archived. No new replies allowed.