![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 27.06.2019 01:00 drma1084
Write a program to test for primality of any number n (that is, to test if n is a prime number). start by writing an algorithm (a set of precise mathematical steps that can be written into a program) to test for primality. for full credit, run the program and use it to test for primality on several numbers. see what the largest number your program can handle is before you find it too slow to yield a result in a reasonable time (if it takes longer than 10 minutes to execute, you are done). use your own imagination. remember that if the number n is even, it cannot be a prime number. you can write your program to simply try if it is a multiple of any numbers smaller than n. also you can design your program to store all prime numbers less than n that your program has found, then take advantage of the fact that a number only needs to be tested to see if it is a multiple of those prime numbers smaller than n/2. if it is not, then it must be a prime number itself.
![ansver](/tpl/images/cats/User.png)
Answers: 1
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 21.06.2019 17:00
How can data be added in a table by using what view
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 21.06.2019 21:00
You should hand write your references on your resume.
Answers: 1
![question](/tpl/images/cats/informatica.png)
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 19:30
Anul 2017 tocmai s-a încheiat, suntem trişti deoarece era număr prim, însă avem şi o veste bună, anul 2018 este produs de două numere prime, 2 şi 1009. dorel, un adevărat colecţionar de numere prime, şi-a pus întrebarea: “câte numere dintr-un interval [a,b] se pot scrie ca produs de două numere prime? “.
Answers: 1
You know the right answer?
Write a program to test for primality of any number n (that is, to test if n is a prime number). sta...
Questions
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 16.12.2019 11:31
![question](/tpl/images/cats/istoriya.png)
History, 16.12.2019 11:31
![question](/tpl/images/cats/geografiya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 16.12.2019 11:31
![question](/tpl/images/cats/en.png)
English, 16.12.2019 11:31
![question](/tpl/images/cats/health.png)
Health, 16.12.2019 11:31
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 16.12.2019 11:31
![question](/tpl/images/cats/istoriya.png)
History, 16.12.2019 11:31
![question](/tpl/images/cats/mat.png)
Mathematics, 16.12.2019 11:31
![question](/tpl/images/cats/es.png)
Spanish, 16.12.2019 11:31
![question](/tpl/images/cats/mat.png)
Mathematics, 16.12.2019 11:31
![question](/tpl/images/cats/mat.png)
Mathematics, 16.12.2019 11:31
![question](/tpl/images/cats/istoriya.png)
History, 16.12.2019 11:31
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)