Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A prime number is a number than can only be divided by itself or by one. Example

ID: 3569331 • Letter: A

Question

A prime number is a number than can only be divided by itself or by one. Examples of prime numbers include 2, 3, 5, 7, 11, 13, and 17. Generate and display all prime numbers between 1 and 999. Save the prime numbers in an array. Display the prime numbers in a table with 10 columns and at least 17 rows by indexing through the array

You will need to use several looping and conditional statements to test all division possibilities. Use document.write() statements to create the table elements and a counter variable to create the table so that it consists of 10 columns. The counter variable should start with an initial value of 0 and be incremented by one each time your code identi?es a prime number and prints it in a table cell. Once 10 cells have been added to the current row), print </tr><tr> to start a new row and reset the variable to 0. Save the document as PrimeNumbers.html

Explanation / Answer

document.write(""); document.write(""); for(count=1;count
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote