Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- </head>
- <body>
- <script type="text/javascript">
- var p = 2;
- var c = 1;
- var d = 2;
- while (c <= 1000) {
- if (p % d == 0) {
- if (p == d) {
- document.write(p + ", ");
- c++;
- }
- d = 2;
- p++;
- }
- else
- d++;
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement