English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

That allows a user to find the prime numbers between 1 and a number not to exceed 1000.

2007-03-13 11:59:20 · 2 answers · asked by Justin 4 in Computers & Internet Programming & Design

2 answers

primenumbers=""
for i=1 to 1000
for j=1 to 1000
if i mod j=0 and i<>j and i<>1 then
primenumbers=primenumbers & j & ","
end if
next
next
print primenumbers

2007-03-19 06:54:46 · answer #1 · answered by r_ranjith 4 · 0 0

Check http://www.planet-source-code.com and search for Prime Numbers or similar in the Visual Basic section of the site. They have a great code library. You may have to signup, which is free. That way you can download code at will. Non-members can only download two or three files daily.

2007-03-13 20:06:21 · answer #2 · answered by Anonymous · 0 0

fedest.com, questions and answers