Heres what needs to be accomplished:

"Write a function to print the day of the week and number of the week on which the minimum power output occurred. If there are several days with the minimum power output, print the information for each day."

Heres what I have

Code:

/*----------------------------------------
This function finds minimum output of array and prints
out the day and week #*/
void min(int power[NROWS][NCOLS])
{
/*Declare and intialize variables*/
int i, j;
double min_x;
/*Determine minimum value in the array.*/
min_x=power[NROWS][NCOLS];
for(i=1; i<NROWS; i++)
{
for(j=1; j<NCOLS; j++)
if(power[i][j] > min_x)
min_x = power[i][j];
printf("Minimum Power Output \n Outage: %f \n Week: %d \n Day: %d \n",min_x, i+1, j+1);
}
}

Just looking at my code and not worrying about what exactly is in my array, will the right things be printed out and if not how do I fix it. Thanks