logic - How to make recursive function that multiply two positive numbers without using mutiplication operator -
Some people ask me this question. I am confused that it is possible to multiply two numbers without using the multiplication operator? Plaz shares this idea.
Its very simple to see this code:
int times ( Int a, int b) {if (b == 1 || b == 0) returns; Then one + times back (a, - b); } I did not test it. Share it only for consideration.
Comments
Post a Comment