Coding for prime number in Visual Basic

Asked By 0 points N/A Posted on -
qa-featured

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?

 

SHARE
Best Answer by Matthew B Brown
Answered By 0 points N/A #157183

Coding for prime number in Visual Basic

qa-featured

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)

Best Answer
Best Answer
Answered By 10 points N/A #157184

Coding for prime number in Visual Basic

qa-featured

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!

Related Questions