Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

multiply two arbitrary integers a and b (a greater than b)

c ← 0
while b ≠ 0
    if (b and 1) ≠ 0
        c ← c + a
    left shift a by 1
    right shift b by 1
return c
Source by en.wikipedia.org #
 
PREVIOUS NEXT
Tagged: #multiply #arbitrary #integers #greater
ADD COMMENT
Topic
Name
8+6 =