Question: help with my code find the average of 2d array c programming #define _CRT_SECURE_NO_WARNING #define CLS system(cls) #define PAUSE system(pause) #define ROWS 10000 #define COL

help with my code

find the average of 2d array

c programming

#define _CRT_SECURE_NO_WARNING

#define CLS system("cls")

#define PAUSE system("pause")

#define ROWS 10000

#define COL 4

#include

#include

// prototype

void displayArray(float grades[][COL], int counter);

int main(){

int counter = 0; // store the effective size

float grades[ROWS][COL] = {{1,2,3,4},{5,6,7,8},{9,10,11,12}};

counter = 3;

displayArray(grades, counter);

PAUSE;

}// End MAIN

void displayArray(float grades[][COL], int counter){

int i,j;

for (i = 0; i < counter; i++){

printf("%i", i);

for(j = 0; j < COL; j++)

printf("\t%.2f", grades[i][j]);

printf(" ");

}

}// END displayArray()

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!