高斯消元法
#include <iostream>#include <iomanip>using namespace std;/* 测试数据: double A[4][4] = { {8,2,1,2.5},{1,8,-0.5,2},{1.5,2,8,-1},{1,0.5,0.7,8} }; double B[4] = { 1.5,-3,-4.5, 3.2 }; 测试结果: X1 = 0.237098 X2 = -0.540835 X3 = -0.416669
原创
2020-08-16 20:27:46 ·
86 阅读 ·
0 评论