identificationdivision. program-id. pebbles. author. "Reisig/ PN Newsletter 10-05 p. 3". * ursprünglich von E. W. Diijkstra date-written. 22.11.2005. date-compiled. datadivision. working-storagesection.
77 b pic 9(4).
77 w pic 9(4). linkagesection.
77 BB pic 9(4).
77 WW pic 9(4). proceduredivisionusing BB WW. * computes solutions for the pebble game move BB to b move WW to w performuntilfalse if w>=1 and b>=1 subtract 1 from b elseif b>=2 then subtract 1 from b elseif w>=2 then subtract 2 from w add 1 to b end-ifend-ifend-if end-perform. display"b="b" w="w. end-program pebbles.
[ zur Elbe Produktseite wechseln0.15Quellennavigators
Analyse erneut starten
]