实验三:解线性方程组的直接法(一).docVIP

  • 65
  • 0
  • 约2.71千字
  • 约 5页
  • 2020-12-24 发布于浙江
  • 举报
计算方法(C语言版)实验报告 实验三:解线性方程组的直接法(一) (第三章) 一、实验目的: 1.用程序验证消元法和三角分解法。 2.掌握直接求解线性方程组的常用算法:列主元高斯消元法、LU分解法等。 3.记录运行结果,回答问题,完成实验报告。 实验条件: Microsoft Visual C++ C-Free 实验内容及运行结果: (一)、用列主元高斯消元法求解线性方程组: x+y-z=1 -x+y-z=1 -x-y-z=3 1.源程序: #includestdio.h #includemath.h #define MAXSIZE 50 void input(double a[MAXSIZE] [MAXSIZE+1],long n); void output(double x[MAXSIZE],long n); int main(int) { double a[MAXSIZE] [MAXSIZE+1],x[MAXSIZE],s,max,t; long n,i,j,k,maxi; printf(\n Please enter the original equations of order number:); scanf(%ld,n); input(a,n); fo

文档评论(0)

1亿VIP精品文档

相关文档