'); wincool.document.writeln(''); wincool.document.writeln(''); for (var i=1; i<=(parseFloat(document.input.elements[0].value,10)); i++) { ans=guess-(findequation(box,guess))/(findderivative(der,guess)); wincool.document.writeln(''); guess=ans; } wincool.document.writeln('
THE LAST VALUE OBTAINED IS THE ANSWER!THE VALUE OF X AFTER EACH LOOP IS:
',i,'',ans,'
'); wincool.document.close(); } return(true); } /* The function above calculates the root of the equation. */ /* Below is the body of the program. */ document.writeln('
'); document.writeln('
PROGRAM BY MR.GEEKY
'); document.writeln('
'); document.writeln('PLEASE ENTER THE NUMBER OF LOOPS THAT THE PROGRAM WILL RUN'); document.writeln('

'); document.writeln('PLEASE ENTER THE POLYNOMIAL EQUATION:

'); document.writeln('

'); document.writeln('PLEASE ENTER THE DERIVATIVE OF THE EQUATION:

'); document.writeln('

'); document.writeln('PLEASE ENTER YOUR GUESS OF THE ROOT:

'); document.writeln('

'); document.writeln('

'); document.writeln('

'); document.writeln('
'); document.writeln('DERIVATIVE=DY/DX (* THIS PROGRAM ASSUMES THAT YOU KNOW CALCULUS *)'); document.close(); 1
Hosted by www.Geocities.ws