Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <link href="style.css" rel="stylesheef" type="text/css"/>
- </head>
- <body bgcolor="yellow">
- <script>
- var i;
- var b;
- var c;
- var max = 1000;
- var min = 0;
- c = Math.floor(Math.random()*1001);
- alert(c)
- b = prompt("Zgadnij liczbe z zakresu od 0 do 1000: ");
- do
- {
- if (b>c)
- {
- alert("Nie zgadles!");
- max=b;
- b = prompt("Zgadnij liczbe z zakresu od " + min + " do " + max );
- }
- if (b<c)
- {
- alert("Nie zgadles!");
- min=b;
- b = prompt("Zgadnij liczbe z zakresu od " + min + " do " + max );
- }
- }
- while (b!=c);
- if (b==c)
- {
- alert("zgadles!");
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement