Coding for prime number in Visual Basic
Which website displays a list of helpful tips about coding for prime number in Visual Basic? Is it also possible to choose all prime numbers in Microsoft Excel?
Which website displays a list of helpful tips about coding for prime number in Visual Basic? Is it also possible to choose all prime numbers in Microsoft Excel?
I found this array formula at Chip Pearson’s site:
=IF(OR(C8=2,C8=3),”prime”,IF(AND((MOD(C8,ROW(INDIRECT(“2:”&INT(SQRT(C8)))))<>0)),”prime”,”not prime”))
This formula is slightly amended from the one on Chip’s site, which treated 1 as a prime, and divided by all numbers up to C8-1, rather than SQRT(C8)
Hello,
Visual Basic is a very user friendly language and so is excel. When I have trouble using such software, I always view the help option in the software. For example you could find commands for almost anything in excel in built help system.
However, as per your request please consult the following links for tips about coding for prime number in Visual Basic:
http://techforum4u.com/entry.php/600-VB-Program-To-Find-Whether-A-Number-is-Prime-Or-Not
http://www.programmersheaven.com/discussion/410507/calculate-prime-numbers-help
And for excel:
http://www.bluemoosetech.com/microsoft-excel-functions.php?jid=29
Hope that helps!