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

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -