-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmatrix_determinant.c
67 lines (64 loc) · 1.07 KB
/
matrix_determinant.c
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
#include <stdio.h>
#define MAX 10
int main()
{
/* code */
int x,y,b=0,t,bestline(int x,int y,int b);
int* take (int x,int y);
printf("*********ce programe va donnez le determenent d\'un matrice************\n");
printf("combiane des colone ?\n");
scanf("%d",&x);
printf("combiane des line ?\n");
scanf("%d",&y);
int tab[y][x];
take (x,y);/*take tableau input*/
b=bestline(x,y,b);/*search the best line */
do
{
/*if( >x && <y )
=1;
else if ( >y && <x )
=1;*/
}
while( t<=x)
return 0;
}
int* take (int x,int y)
{
int i,j;
for (i=0;i<y;i++)
{
for (j=0;j<x;j++)
{
printf("%d %d\n",x,y);
printf("enter the number in line %d colone %d\n",i+1,j+1 );
scanf("%d",&tab[i][j]);
}
}
return(*tab);
}
int bestline( int x,int y,int b )
{
int d;
for(int i=0;i<y;i++)
{
d=0;
for (int j = 0; j < x; j++)
{
if(tab[i][j]==0)
d++;
}
if (b<d)
b=i;
}
//printf("%d",e);
return (b);
}
int calcule (int b1)
{
for (int i = 0; i < x; i++)
{
grandsome+=tab[b][i]*
d=-d;
}
}