Question #294052

Write an algorithm which multiplies two numbers using the minimum number of additions.


Expert's answer

Stat function multiply(firstnum,secondnum):
    if secondnum = 0 then
        return 0
    else 
       return firstnum + multiply(firstnum, secondnum-1)
    end if
Stop

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS