SHARE
TWEET

Jelena

a guest Jan 19th, 2020 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3. <script>
  4. { function f()
  5. (var max=0;
  6. var n=prompt("Unesite broj ->");
  7. var n2=n;
  8. whila(n%10>0)
  9. {if(n%10>max)
  10. {max=n%10; }
  11. n=Math.floor(n/10);
  12. }
  13. var k=Math.sgrt(max);
  14.  document.getElementById("h").innerHTML="Kvadratni koren od " + max + " je " + k;
  15.  
  16. }
  17. }
  18.  </script>
  19.  </head>
  20.  <body>
  21.  <h1 id="h"></h1>
  22.  <br>
  23.  <br>
  24.  <form>
  25.  <input type="button" value="MAX cifra" onclick="f()">
  26.  </form>
  27.  </body>
  28.  </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top