include iostream include stdio include conio define define int main in

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#include <iostream.h>
#include <stdio.h>
#include <conio.h>
#define N 3
#define M 3
int main(){
int max,min;
int mat[N][M]={{1,2,3},{4,5,6},{7,8,9}};
char a;
cout << "
Dlya vvoda stolbca vvedite 1, dla ctroki 2:";
int b,i,j;
i=0;
j=0;
cin >>a;
switch (a)
{case '1': cout << "
Vvedite nomer stolbca 0,1 ili 2:";
cin>>b;
if(0>b>=3)
{cout<<"
neverno vvedeno znacenie";
getch ();
return 0;
}
else
{
for(i=0;i<3;i++)
{
if(min>mat[i][b])
min=mat[i][b];
}
cout<<"
Minimum v stolbce nomer"<<b<<" raven"<<min;
max=mat[0][b];
for(i=0;i<3;i++)
{
if(max<mat[i][b])
max=mat[i][b];
}
cout<<"
Maxumum v stolbce nomer"<<b<<" raven"<<max;
getch ();
return 0;
}
case '2': cout << "
Vvedite nomer STROKI 0,1 ili 2";
cin>>b;
if(0>b>=3)
{cout<<"
neverno vvedeno znacenie";
getch ();
return 0;
}
else
{
for(j=0;j<3;j++)
{
if(min>mat[b][j])
min=mat[b][j];
}
cout<<"
Minimum v stroke nomer"<<b<<" raven"<<min;
for(j=0;j<3;j++)
{
if(max<mat[b][j])
max=mat[b][j];
}
cout<<"
Maxumum v stroke nomer"<<b<<" raven"<<max;
}
default: cout<<"
neverno vvedeno znacenie";
getch();
return 0;
}
}