Version compl�te: jsB@nk » » Solving factorielles
URL: https://www.javascriptbank.com/solving-factorials.html
Cet JavaScript calcule le nombre d'usine.
Version compl�te: jsB@nk » » Solving factorielles
URL: https://www.javascriptbank.com/solving-factorials.html
<script language="javascript">//solving factorialsvar factored = 1;function factorial(form) {var number = form.factor.value;var n = number;for (i = n; i>0 ; i--){if (n>170){form.result.value="Hey! that is too big for my pea brain";}else{if (i==n){factored= i;}else{factored = factored*(i);}form.result.value=factored;}}return factored;} </script><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<form method="post"><input type="text" size="4" maxlength="4" name="factor"><input type="button" onclick="factorial(this.form)" value="factorate"><input type="text" size="40" maxlength="40" name="result"></form><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->