:9.647KB : :1 :2022-10-05 15:44:48
利用c++计算三阶行列式(适合初学者)如果开发者对于本文件有需要的可以参考。
#include
using namespace std;
int main()
{
int a=0, b=0;
int a1[3][3];
for (a = 0; a < 3; a )
for (b = 0; b < 3; b )
cin >> a1[a][b];
cout << "三阶行列式输入完毕,";
system("pause");
cout << "行列式如下:";
for (a = 0; a < 3; a )
{
cout << endl << endl;
for (b = 0; b < 3; b )
cout << a1[a][b]<<"\t";
}
int result;
result = (a1[0][0] * a1[1][1] * a1[2][2] a1[0][1] * a1[1][2] * a1[2][0] a1[1][0] * a1[2][1] * a1[0][2]) - (a1[0][2] * a1[1][1] * a1[2][0] a1[0][1] * a1[1][0] * a1[2][2] a1[0][0] * a1[1][2] * a1[2][1]);
cout << "行列式结果为:"<
}
10-09C++计算圆的直径、周长、面积
10-01c++计算器代码
08-30c++计算是否为素数
07-13c++计算1000内的完数
02-08C++计算机锁定程序
01-15c++计算器源码