parent
0887853f69
commit
51c363dea7
@ -0,0 +1,19 @@
|
||||
<html><body><pre><script>
|
||||
|
||||
document.write("\nmultiplier en recursif 3 * 5 \n");
|
||||
/* Pseuso code :
|
||||
|
||||
*/
|
||||
|
||||
function multiplier(opg, opd) {
|
||||
console.log('mulitplier '+opg+'*'+opd);
|
||||
if(opd == 1) {
|
||||
return opg;
|
||||
}
|
||||
else {
|
||||
return (multiplier(opg, opd -1) + opg);
|
||||
}
|
||||
}
|
||||
|
||||
document.write(multiplier(3,5));
|
||||
</script></pre></body></html>
|
Loading…
Reference in new issue