ce programme pour pour résoudre un matrice:
voila le code de programme
#include <stdio.h>
#include <stdlib.h>
void debut(){
printf("\n\n\n\n\n\t\t%c%c bonjour dans ma programme de matrice %c%c\n\n\n\n\n ",1,2,2,1);
}
int main(int argc, char *argv[])
{
debut();
int i,j;
float mat[6];
float dx,dy,d,x,y;
printf("\t\t-------------------\n");
printf("\t\t|11 22| |X| |55|\n");
printf("\t\t| | *| |= | |\n");
printf("\t\t|33 44| |Y| |66|\n");
printf("\t\t-------------------\n");
for(i=0;i<6;i++){
printf("donner %d%d =",i+1,i+1);
scanf("%f",&mat[i]);
}
system("cls");
printf("\n\nDonc voutre matrice est ::\n");
printf("\t\t-------------------------\n");
printf("\t\t[%.1f %.1f] [X] [%.1f]\n",mat[1],mat[2],mat[5]);
printf("\t\t * =\n");
printf("\t\t[%.1f %.1f] [Y] [%.1f]\n",mat[3],mat[4],mat[6]);
printf("\t\t-------------------------\n");
d=(mat[1]*mat[4])-(mat[3]*mat[2]);
printf("\nDONC votre D est:\n");
printf("\n|%.1f %.1f|\n",mat[1],mat[2],mat[5]);
printf(" =d=%.1f\n",d);
printf("|%.1f %.1f| \n",mat[3],mat[4],mat[6]);
dx=(mat[5]*mat[4])-(mat[2]*mat[6]);
dy=(mat[1]*mat[6])-(mat[5]*mat[3]);
x=dx/d;
y=dy/d;
printf("\n\ndonc\n \n::X=%.1f\n\net\n::Y=%.1f\n",x,y);
system("PAUSE");
return 0;
}