www.pudn.com > zuisuxiajiangfa.rar > 3.c


#include "stdio.h" 
#include "math.h" 
#define N 20 
 
float c,a[N][N],x[N],b[N],e,r[N],r1[N],r2[N],x0[N],max; 
 
void B(float s, float d[N],int n) 
{   
	int i;  
    for(i=0;imax) 
         max=fabs(r[i]);  
      if(max<=e)     
		  break; 
      
     ax(a,r,n);  
     c=rr(r,r,n)/rr(r2,r,n); 
     B(c,r,n); 
     plus(x,r1,n); 
     B(c,r2,n); 
     plus(r,r1,n); 
 
 
    printf("\nB%d:",m); 
    for(i=0;i100) 
	 break; 
  } 
	 if(m==1) 
     printf("x0 is the answer!"); 
   
	getch(); 
}