Hello i am new to java and o have to write a program that determines the number of prime numbers less than N which is given by the user, but i have no clue where to start
EricaMitchell
0
Newbie Poster
Recommended Answers
Jump to PostI would start with the number 1, then test if it is prime, then go to 2, and so on until N. To test if it is prime, you might want to just compare dividing it to every number below it, to see if it divides evenly.
Of course, …
All 5 Replies
joehms22
18
Junior Poster
thines01
401
Postaholic
Team Colleague
Featured Poster
JeffGrigg
170
Posting Whiz in Training
nicolebdillen
0
Newbie Poster
anas2ahmad
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.