identification division.
program-id. chaff.
author. "David Gries".
* aus "Eliminating the Chaff"
* Marktoberndorff 1996
date-written. 25.10.2004.
date-compiled.
data division.
working-storage section.
77 i pic 99.
77 j pic 99.
77 e pic 99.
77 n pic 99.
linkage section.
01 a occurs 9.
02 b occurs 9 pic 99.
77 x pic 99.
procedure division using a x.
move length of a to n
move -1 to i
move n to j
perform until i+1 not = j
compute e=function mod(i+j,2)
if b(e)<=x move i to e
else move j to e
end-perform
* now ??
* interval inclusion for minimum??
end-program chaff.
¤ Dauer der Verarbeitung: 0.19 Sekunden
(vorverarbeitet)
¤
|
Haftungshinweis
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.
|