identificationdivision. program-id. zahlenlotto. * aus Pomberger, Dobler * Algorithmen und Datenstrukturen, p57 author. "JD". date-written. 3.6.2008. date-compiled. datadivision. working-storagesection.
77 i pic 9(4).
77 n pic 9(4).
77 k pic 9(4).
77 nf pic 9(4).
77 kf pic 9(4).
77 nmkf pic 9(4).
77 bc pic 9(4). proceduredivision. * computes something accept n accept k * n! move 1 to nf performvarying i from 1 until i>n multiply nf by i end-perform * k! move 1 to kf performvarying i from 1 until i>k multiply kf by i end-perform * (n-k)! move 1 to nmkf performvarying i from 1 until i>n-k multiply nmkf by i end-perform * binomial coefficient compute bc = nf / (kf * nmkf) display bc end-program fak.
¤ 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.0.6Bemerkung:
¤
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.