FAKTORIAL

ID
Nazov / Name:
Popis / Description:
Dlzka / Length:
Testovane pod / Tested under:

 

114
p114.html / p114.zip
Vypocet faktorialu
406b
NN 4.04, IE 4.0

UKAZKA / CLICK HERE

Zdrojovy tvar / Source code:

<HTML> <head> <title> JavaScript DESTINATION - P114 </title> </head> <BODY> <SCRIPT LANGUAGE="JavaScript"> <!-- function factorial(n) { if ( (n==0) || (n==1) ) return 1; else { result= (n * factorial(n-1)); return result; } } var a=window.prompt('Napiste cislo: '); document.write(a+'!='+factorial(a)); // --> </SCRIPT> </BODY> </HTML>
[ Navrat / BACK ]