answersLogoWhite

0


Best Answer

Private Sub Command1_Click() Dim I, N As Integer N = Val(Text1.Text) For I = 2 To N - 1 If N Mod I = 0 Then Print "THE NUMBER IS NOT A Prime number" Exit Sub End If Next I Print "THE NUMBER IS A PRIME NUMBER" End Sub Private Sub Command2_Click() Text1.Text = "" Text1.SetFocus End Sub Private Sub Command3_Click() End End Sub

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program to find prime number in vb net?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the largest prime no that is stored in 8 bit pattern?

Write your own prime number program and find out.


Write a c program to find given number is prime or not?

Yes, do write, or if you're too lazy to your homework, use google.


How do you write a VBnet program to find the prime numbers between 100 to 200?

VBnet program to find the prime numbers between 100 to 200?


With a given big integer number which is the product of two prime numbers how do you find them?

First write a program to generate the prime number. After one prime number was generated, divide the big int number by the prime number. If the remainder is zero then quotient is the second prime number ( also it is important to check whether the quotient is prime number or not because sometimes you will get wrong answer). Repeat the process until you get the result.


A program to find that the input number is prime or not?

Use Wolfram|Alpha... go to the related link below, Wolfram|Alpha, and type in (is __ (number) prime) and then the program will compute that and tell you if it is prime or composite.


write a pseudocode to accept a number and find if it is prime or not?

Yes


Write a C program to find the sum of all prime numbers?

Since there is an infinite set of prime numbers the answer would be infinity.


Prime numbers between 1 to 10 in microprocessor 8085?

program to find prime number in 8085 microprocessor


Write a Shell program to find the smallest number from a set of numbers?

k


Write a java programme to check whether the number is twin prime or not?

Find a prime number, add 2 to the number. Check if the new number is prime. IE : 3 is prime. 3+2 =5. 5 is prime. (3,5) are twin primes.


How do you write a program to find whether the given number is prime or not and show output?

#include<stdio.h> #include<conio.h> void main() { int n,a=2; clrscr(); printf("\n enter n"); scanf("%d",&n); if(i<=a-1) { if(a%i==0) { printf("\n the given number is not a prime number"); break; } i++; if(a==i) { printf("\n the given number is a prime number"); } getch(); output: enter the value of n:2 the given number is prime number


How do you write a program in lisp to find if a number is prime or not?

(defun prime (num) (if (< 2 num) (do ((dividend 2 (1 + dividend)) (chk-to (sqrt num))) ((equal (rem num dividend) 0)) (when (<= chk-to dividend) (return t))) t))