Question: This is in c programming using arrays i already have some of the code i just dont know how to do the average and the

This is in c programming using arrays i already have some of the code i just dont know how to do the average and the total using arrays it should output like the example thank you

This is in c programming using arrays i already have some of

// Programmer: Caleb Carey Ryan // Date: 3/11/19 // Program Name: 2D Rainfall // Chapter: Chapter 5 - Array // Description: 2 complete English sentences describing what the program does, // algorithm used, etc.

#define _CRT_SECURE_NO_WARNINGS // Disable warnings (and errors) when using non-secure versions of printf, scanf, strcpy, etc. #include // Needed for working with printf and scanf

int main(void) { // Constant and Variable Declarations const int RAIN_ROW = 5; const int RAIN_COULUMN = 12; double rainNumbers[RAIN_ROW][RAIN_COULUMN] = {{0.88, 1.11, 2.01, 3.64, 6.44, 5.58, 4.23, 4.34, 4.00, 2.05, 1.48, 0.77}, {0.76, 0.94, 2.09, 3.29, 4.68, 3.52, 3.52, 4.82, 3.72, 2.21, 1.24, 0.80}, {0.67, 0.80, 1.75, 2.70, 4.01, 3.88, 3.72, 3.78, 3.55, 1.88, 1.21, 0.61}, {0.82, 0.80, 1.99, 3.05, 4.19, 4.44, 3.98, 4.57, 3.43, 2.32, 1.61, 0.75}, {0.72, 0.90, 1.71, 2.02, 2.33, 2.98, 2.65, 2.99, 2.55, 1.99, 1.05, 0.92} };

double totalRain = 0; double averageRain = 0;

// *** Your program goes here ***

printf(" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ");

for (int i = 2010; i

printf("Total rainfall for each year: "); for (int i = 2010; i

return 0; } // end main()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!