|
-
Oct 10th, 2002, 01:13 PM
#1
Thread Starter
New Member
Prime Numbers!!!
Write a program that asks a user to enter a number (number can be negative, positive, or zero), and then displays all prime numbers from zero to this number (for this project prime numbers can be positive and negative), and the product of all these prime number (must specify how many prime numbers are in the product)
The program must check for incorrect input, and have an EXIT button.
The form will have one text box, one button, and one list box.
I can not figure out the formula for prime numbers.
Any help will be greatly appreciated
-
Oct 10th, 2002, 01:32 PM
#2
Fanatic Member
Re: Prime Numbers!!!
Allright,
There's a function called Mod, which returns a value depending if the value of the number is "dividable" by X...
Exemple:
10 Mod 2 = 1
9 Mod 3 = 1
9 Mod 2 = 0
10 Mod 3 = 0
Get it?
Well, I guess you can figure out the rest by your self...
InputBox stuff or textbox with buttons...
Still got a problem? Post again! 
Originally posted by Searcher
Write a program that asks a user to enter a number (number can be negative, positive, or zero), and then displays all prime numbers from zero to this number (for this project prime numbers can be positive and negative), and the product of all these prime number (must specify how many prime numbers are in the product)
The program must check for incorrect input, and have an EXIT button.
The form will have one text box, one button, and one list box.
I can not figure out the formula for prime numbers.
Any help will be greatly appreciated
-
Oct 10th, 2002, 01:41 PM
#3
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|