#include#include#include#include#define maxsize 1024
typedef int datatype;
const int m = 3;
const int n = 3;
typedef struct {
datatype data[maxsize][maxsize] = {0};
datatype max[maxsize] = {0}, min[maxsize] = {0};
} array;
void Init(array *&arr, int m, int n) {
int i = 0;
int j = 0;
arr = (array *)malloc(sizeof(array));
for (i = 0; i< m; i++) {
for (j = 0; j< n; j++) {
scanf("%d", &arr->data[i][j]);
}
}
}
void Show(array *arr) {
int i;
int j;
for (i = 0; i< m; i++) {
for (j = 0; j< n; j++) {
printf("%d", arr->data[i][j]);
}
printf("\n");
}
}
void maxmin(array *arr) {
int i, j;
int max = 0;
int min = 999;
for (i = 0; i< m; i++) {
max = 0;
for (j = 0; j< n; j++) {
if (arr->data[j][i] >max) {
max = arr->data[j][i];
}
}
arr->max[i] = max;
}
for (i = 0; i< m; i++) {
min = 999;
for (j = 0; j< n; j++) {
if (arr->data[i][j]< min) {
min = arr->data[i][j];
}
}
arr->min[i] = min;
}
for (i = 0; i< m; i++) {
for (j = 0; j< n; j++) {
if (arr->max[i] == arr->min[j]) {
printf("%d", arr->max[i]);
}
}
}
}
int main() {
int m = 0, n = 0;
int i, j;
array *a;
scanf("%d%d", &m, &n);
Init(a, 3, 3);
Show(a);
maxmin(a);
}
成都創(chuàng)新互聯(lián)公司是專業(yè)的龍山網(wǎng)站建設(shè)公司,龍山接單;提供網(wǎng)站制作、做網(wǎng)站,網(wǎng)頁設(shè)計(jì),網(wǎng)站設(shè)計(jì),建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進(jìn)行龍山網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴(kuò)展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團(tuán)隊(duì),希望更多企業(yè)前來合作!你是否還在尋找穩(wěn)定的海外服務(wù)器提供商?創(chuàng)新互聯(lián)www.cdcxhl.cn海外機(jī)房具備T級(jí)流量清洗系統(tǒng)配攻擊溯源,準(zhǔn)確流量調(diào)度確保服務(wù)器高可用性,企業(yè)級(jí)服務(wù)器適合批量采購,新人活動(dòng)首月15元起,快前往官網(wǎng)查看詳情吧