1 su=0;for i=1:100if mod(i,5)==0 su=su+i;endendfprintf('所求和为:%d',su);2a=1;b=10;disp('x(1)=1 \n x(2)=10');for i=3:10t=b;b=(a+b)/2;a=t;fprintf('x(%d)=%1.4d\n',i,b);end3function aver=average(a)aver=sum(a)/length(a)end
你猜!!!!!!!!!!!