Sha256: c936055ae2d8bdba45b2353d22de8b1bb7316c8208c8440cc5d6d73f04007c33
Contents?: true
Size: 415 Bytes
Versions: 23
Compression:
Stored size: 415 Bytes
Contents
;redcode ;name mult ;strategy multiplication demo: compute acc = x * y x DAT #7 ; multiplicand y DAT #6 ; multiplier acc DAT #0 ; accumulator -- result goes here mult ADD x, acc ; add x to acc SUB #1, y ; subtract 1 from y JMN mult, y ; repeat if y is not 0 DAT #0 ; algorithm halts here end mult
Version data entries
23 entries across 23 versions & 1 rubygems