include stdio include stdlib define define int main int argc char argv

 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
#include <stdio.h>
#include <stdlib.h>
#define N 2
#define M 2
int main(int argc, char *argv[]) {
int B[N][M];
int i,j,max,temp;
printf("Vvedite matrix:");
for (i=0;i<N;i++)
{
for (j=0;j<M;j++)
scanf ("%d",&B[i][j]);
}
max=B[1][1];
for (i=0;i<N;i++)
{max=B[i][1];
for (j=1;j<M;j++)
{
if (fabs(B[i][j])>max)
max=fabs(B[i][j]);
temp=j;
}
B[i][temp]*=-1;
}
printf("Polychim massive:");
for (i=0;i<N;i++)
{
for (j=0;j<M;j++)
printf ("%d",&B[i][j]);
}
systen()
return 0;
}