help:saddle problem in c

//max_colum min_row
#include<stdio.h>
#include<conio.h>
#include<string.h>
#define N 20
#define M 20
int min_row(int a[],int m,int i)
{
int min,j;
min = *(a+i*m);
for(j=1;j<m;j++){
if(*(a+i*m+j)<min)
min = *(a+i*m+j);
return min;
}
}
int max_colum(int a[],int m,int n,int j)
{
int max,i;
max = *(a+j);
for(i=1;i<n;i++){
if(*(a+i*m+j)>max)
max = *(a+i*m+j);
return max;
}
}
int main()//row is N,colum is M.
{
int a[N*M];
int n,m,i,j;
int min[N],max[M];
printf("input row and colum:");scanf("%d%d",&n,&m);
printf("input matric:");
for(i=0;i<m;i++)
for(j=0;j<n;j++){
printf("a[%d][%d]",i,j);
scanf("%d",a+i*m+j);
}
for(i=0;i<n;i++)
min = min_row(a,m,i);/*error:??????????incompatible type in assignment of int to int[20]*/
for(j=0;j<m;j++)
max = max_colum(a,m,n,i);//error:????
printf("output matric:");//ta se in ma tran theo tung hang.
for(i=0;i<n;i++)
for(j=0;j<m;j++)
printf("%d\t",*(a+i*m+j));
printf("\n");

}

Last edited on
Hi

hey man what is this ? please write what your problem is, and please put your code in code syntax, code cant be read when you dont use code syntax
ok .man because I'm new user so ......and i try but I can't put my code inside format I chosse code but........it here!!!sorry.
Last edited on
Topic archived. No new replies allowed.