#include conio.h
#define MAX 3
//function prototype
void inputMAt();
void determinant();
int matrix[MAX][MAX];
int x=0,y=0;
int inputMat(int i, int j){
int next=10;
cout<<"\n\n\tINPUT A NUMBER : ";
for(i=0;i
}
next=next+8;
}
return (i,j);
}
void determinant(){
//int result;
}
void main(){
int x=0,y=0;
char ans;
do{
{
cout<<"\tMilloza, Julius S.";
cout<<"\t\t\t\tMay 11, 2011";
inputMat(x,y);
determinant();
gotoxy(10,10);
cout<<"Determinant : ";
}
cout<<"\n\n\tTRY AGAIN(Y/N)? : "; cin>>ans;
clrscr();
}while(ans=='y'||ans=='Y');
}
#include
ReplyDelete#include
#define MAX 3
//function prototype
void inputMAt();
void determinant();
int d[MAX][MAX];
int x=0,y=0;
void inputMat(){
int next=10;
cout<<"\n\n\tINPUT A NUMBER [MATRIX] : ";
for(int x=0;x>d[x][y];
}
next=next+8;
}
}
//function for solving the determinant
void determinant(){
int result;
//solution for determinants
result=((d[0][0]*d[1][1]*d[2][2])+(d[0][1]*d[1][2]*d[2][0])+(d[0][2]*d[2][1]*d[1][0])
-(d[2][0]*d[1][1]*d[0][2])-(d[1][0]*d[0][1]*d[2][2])-(d[0][0]*d[1][2]*d[2][1]));
gotoxy(25,10);
cout<>ans;
clrscr();
}while(ans=='y'||ans=='Y');
}