文件名称:C语言编程常用经典算法实例
文件大小:270KB
文件格式:RAR
更新时间:2012-01-12 18:23:55
C语言编程常用经典算法实例
#include "aband.c" #include "stdio.h" main() { int i; static double b[8][5]={ {3.0,-4.0,1.0,0.0,0.0}, {-2.0,-5.0,6.0,1.0,0.0},{1.0,3.0,-1.0,2.0,-3.0}, {2.0,5.0,-5.0,6.0,-1.0},{-3.0,1.0,-1.0,2.0,-5.0}, {6.0,1.0,-3.0,2.0,-9.0},{-4.0,1.0,-1.0,2.0,0.0}, {5.0,1.0,-7.0,0.0,0.0}}; static double d[8][3]={ {13.0,29.0,-13.0}, {-6.0,17.0,-21.0},{-31.0,-6.0,4.0},{64.0,3.0,16.0}, {-20.0,1.0,-5.0},{-22.0,-41.0,56.0},{-29.0,10.0,-21.0}, {7.0,-24.0,20.0}}; if (aband(b,d,8,2,5,3)>0) for (i=0;i<=7;i++) printf("x(%d)=%13.7e, %13.7e, %13.7e\n", i,d[i][0],d[i][1],d[i][2]); }