# Write a recursive algorithm

Not what you're looking for? Search our solutions OR ask your own Custom question.

Write a recursive algorithm to multiply two numbers.

Mult(a,b) = a

Mult(a,(b-1))+a

if b = 1

if b > 1

https://brainmass.com/computer-science/algorithms/write-a-recursive-algorithm-5903

#### Solution Preview

if (b==1)

<br> mult(a,b)=a;

<br>if (b>1)

<br> mult(a,b)=a + mult(a,(b-1))

<br> =a + (a + ...

#### Solution Summary

This job helps to write a recursive algorithm.

$2.49