Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- </head>
- <body>
- Wpisz liczbe:<input type="text" id="liczba"/><br/>
- <button onclick="suma()">Oblicz silnie</button><br/>
- Wynik to: <span id="napis"></span>
- <script type="text/javascript">
- function suma()
- {
- wynik=1;
- var a =document.getElementById("liczba").value;
- for(i=1; i<=a;i++)
- {
- wynik=wynik*i;
- }
- document.getElementById("napis").innerHTML=(wynik);
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement