I want to write a PHP function that performs multiplication WITHOUT using a loop or the * operator. It should use repeated addition with recursion.
Where have i gone wrong?
this project is to tell me if this is correct?
<?php
function phpMult($a,$b){
$c;
c = a + b;
echo " The sum of A and B is" <
Dear sir, I have over 10 years of experience in Web Development including PHP, Smarty, MySQL, jQuery, etc. Also I am Zend Certified PHP Developer (ZCE). I can help you out with your troubles. Let's do it!
recursion call is not ok.
It should be repeated as serveral times as you want to add an element......
If you don't have the answer with this, i can do this funciton for you :-)
Hi, that isn't correct (if I remember my beginner c++ reading of a few years back then you have used some c++ in there). I can guide you to the correct procedure, since it seem like you want to learn - hint you only need the a and b variable.
Hello, I already know where you have gone wrong, and I know the code to solve the problem. if you choose me, you will have answer in less than 20 minutes