دستت درست!!
برگه ای که بدستم دادن خط خطی بود بد خوندم!!
من هم سر این مانده بودم کرامر خوده راهه((( سوال همان دترمینان ماتریس گرفتن بوده))
#include <iostream.h>
#include <conio.h>
int calc(int [],int dim);
void revmatrix( int [],int dim);
void main()
{
int matrix[1000];
int dim,temp;
double leftsum,rightsum;
cout<<" PLEASE ENTER MATRIX DIMENSION : ";
cin>>dim;
cout<<"\n\n\n";
for( int i = 0;i<( dim*dim );i ++ )
{
cout<<"ENTER ELEMAN : ";
cin>>temp;
matrix = temp;
clrscr();
cout<<" PLEASE ENTER MATRIX DIMANTION : "<<dim;
cout<<"\n\n\n";
}//for i
if ( dim > 2 )
{
leftsum = calc( matrix , dim );
cout<<"LEFTSUM of the matrix = "<< leftsum <<"\n\n";
revmatrix( matrix , dim );
rightsum = calc( matrix ,dim );
cout<<"RIGHTSUM of the matrix = "<< rightsum <<"\n\n\n\n\n\n" ;
cout<<" ( DETERMINAN OF THE MATRIX = "<< leftsum - rightsum<<" )";
}
else
cout<<" ( DETERMINAN OF THE MATRIX = "<<(matrix[0] * matrix[3] - matrix[1] * matrix[2])<<" )";
getch();
}//end main
/////////////////calc function//////////
int calc( int matrix[ ], int dim )
{
int sum = 0, bul, x = 1;
for( int l = 0; l<( dim*dim );l += ( dim+1 ) )//ghotr asli
x *= matrix[l];
sum = x;
x = 1;
for( int c = 1;c<dim;c ++ )
{
bul=c;
for( int m = 0;m<dim;m ++ )
{
if( ( bul+1 )%dim != 0 )
{
x *= matrix[bul];
bul +=( dim + 1 );
}
else
{
x = x * matrix[bul];
bul += 1;
}
}//for m
sum += x;
x = 1;
}//for c
الان این چیکار میکنه((من خودم c ندارم))