endbreak;while a0,A(6)=5*a+1;if A(6)=fix(A(6),a=a+1;i=6; continue; a a =1023while i=2,A(i-1)=A(i)*5/4+1;if A(i-1)=fix(A(i-1), break;end i=i-1;if (A(1)=0)&(A(1)=fix(A(1), A(1)ans 15621plot(A,k)1e- nx1.2当 n = 0, 1, 2, L, 100 时,选择稳定的算法计算积分In = 0 e- x +10 dx用蒙特卡罗方法求解该问题,在(0,1)上随机选取一定数量的点,以落在积分区域内的频率近似所求积分,matlab 程序如下:mtj.mfunction a=mtj(n)f=(x)exp(-n*x)/(exp(-x)+10); N=10000;r=0;if A(2)X=Bj*X0+fj; X0=X;if (norm(X-X1,inf)10) break;end k=k+1;c. Gauss-Seidel 迭代法: 0.000002111208571 0.000021