Œ¸‘¬–@

program gensoku2(input,output); const delta=1E-10; var i,k:integer;{$B#k$O2?2s7W;;$r$7$?$+%+%&%s%?!<(B} x1,u,x,d:real;{$B#x$O=PH/CM$H$9$k(B} function f(x:real):real; begin f:=((((x-7)*x+16)*x-8)*x-16)*x+16 end; { f } function f1(x:real):real; begin f1:=(((5*x-28)*x+48)*x-16)*x-16; end; { f1 } begin k:=0; u:=1;{$B8:B.MQ(B} for i:=-10 to 20 do begin x:=i; if x<>2 then begin repeat d:= -f(x)/f1(x); x1:=x+u*d; if abs(f(x1)) < (1-u/4)*abs(f(x)) then else u:=u/2; x:=x1; k:=k+1 until abs(f(x)) < delta; end; writeln('$B=PH/CM(B:',i:3,' ','$B7W;;2s?t(B:':10,k:3,' ',x:15); k:=0; end end.


Last modified: 2000$BG/(B1$B7n(B20$BF|(B 13:51