IdentificationDivision. Program-Id. francez-p62. Author. "Nissim Francez". * "aus Program Verification" DataDivision. Working-StorageSection.
77 x pic S9(8) comp-2.
77 xn pic S9(8) comp-2.
77 te pic S9(8) comp-2.
77 eps pic S9(2)V9(8) value 0.00001. LinkageSection.
77 a pic S9(8) comp-2. ProcedureDivisionusing a.
l0. display"start". move a to x move 1 to xn
l. compute te=a - xn**2 iffunction abs(te)>eps then compute xn=(a+xn)/(2*xn) else goto le end-if. goto l.
le. display"halt xn=" xn " x=" x End-Program francez-p62.
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.