Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Plastic surgery project max
Plastic surgery project max
Hello, please refer to the following procedures and attach the running results at the end.

# include & ltstdlib.h & gt

# include & ltstdio.h & gt

void max(int a[][4],int k,int *x,int *y,int * z);

int main(void)

{

int a[3][4] = { { 1,2,3,4,},

{8, 12, 1 1, 10},

{5, 6, 7, 9}};

int m,n;

int num

Maximum value (a, 3, & numbers & amp&; n);

Printf ("The largest integer in array A is: a[%d][%d] = %d\n", m, n, num);

Returns 0;

}

void max(int a[][4],int k,int *x,int *y,int *z)

{

int i,j,m,n;

int num = a[0][0];

for(I = 0; I & ltk;; i++){

for(j = 0; j & lt4; j++){

if(a[I][j]& gt; num){

m = I;

n = j;

num = a[m][n];

}

}

}

* x = num

* y = m;

* z = n;

}

Feng @linux:~$! g

Gcc- wall test

Feng @linux:~$ /a.out

The largest integer in array a is: a [1] [1] =12.