Question about Microsoft Visual Basic 6.0 for PC
Tell me the coding to be done to check that a number is prime or not
as soon as possible.
Write the following function and call it whenever you need to evaluate a number:
Private Function IsPrime(ByVal Number As Long) IsPrime = False Dim I As Long For I = LBound(Primes) To UBound(Primes) DoEvents Call UpdateStatus(Number, Primes(I)) If (Number Mod Primes(I) = 0) Then Exit Function If (Primes(I) >= Sqr(Number)) Then Exit For Next IsPrime = True End Function
Posted on Jan 06, 2009
Tips for a great answer:
Oct 19, 2012 | Microsoft Visual Basic 6.0 (361-00686) for...
Apr 16, 2010 | Microsoft Visual Basic Professional...
Jan 27, 2010 | Microsoft Visual Basic 6.0 for PC
Apr 15, 2009 | Microsoft Mlf Visual Studio Enterprise...
Apr 08, 2009 | Microsoft Visual Basic Enterprise Edition...
Mar 03, 2009 | Microsoft Visual Basic 6.0 for PC
Feb 19, 2009 | Microsoft Visual Basic 6.0 (361-00686) for...
Apr 20, 2015 | Microsoft Visual Basic 6.0 for PC
81 people viewed this question
Usually answered in minutes!
Step 2: Please assign your manual to a product: