C语言解线性方程的四种方法.docxVIP

  • 6
  • 0
  • 约6.72千字
  • 约 7页
  • 2019-09-14 发布于广东
  • 举报
C语言解线性方程的四种方法 发了好几天编了个解线性方程组的小程序,可第一次实战就大败而归。经过半天的调试,仍 找不出纠正的方法。因为并不是算法的问题,而是因为自己对编译器处理浮点函数的方法 不是很理解。明明D=0的方阵解出来不等于0 了,跟踪调试发现,计算过程程序对数据进 行了舍去处理,导致最终结果不对。不过如果没有浮点型的话,这个程序应该算不错了。 复制代码代码如下: # includestdio.h #in cludemath.h #includemem.h #define NUM 100 void print(void) /* 使用说明 */ {clrscrf); printf(\n\n\n\n\n\t\t\t\t Introduction \n); printf(\t* *\n); printf(\t* This program was design for compute linear equations. *\n”); printf(\t* The way of use it is very simple. *\n“); printf(\t* First: Input the number of the equation;(lnput 0 to exit) *\n”); prin tf(\t* Sec ond: In put the coefficie nt of e

文档评论(0)

1亿VIP精品文档

相关文档