944,127 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 1288
  • Java RSS
May 30th, 2007
0

java

Expand Post »
how to write a program to print first 15 prime nos in java?
Similar Threads
Reputation Points: 28
Solved Threads: 0
Newbie Poster
aneetasuneel is offline Offline
2 posts
since May 2007
May 30th, 2007
0

Re: java

We will not program your assignments for you. You have to show us some effort before we can help you. Post your code, we can help diagnose some problems. But don't come here expecting us to answer questions without any effort on your part.

To get started, ignore the Java part completely. Just think about what you need to do in order to compute prime numbers. Come up with an "algorithm" of how to do it in your mind.

Then re-write the steps you took in your mind as Java statements. Make this a method in a class (perhaps public static void main). Iterate through the steps enough times until you have 15 of them.
Reputation Points: 45
Solved Threads: 28
Posting Whiz in Training
Dukane is offline Offline
282 posts
since Oct 2006
May 30th, 2007
0

Re: java

>how to write a program to print first 15 prime nos in java?
Do something surprising, I dunno maybe try it yourself. No wait. That's just being silly isn't it?
Featured Poster
Reputation Points: 1536
Solved Threads: 431
Posting Expert
iamthwee is offline Offline
5,865 posts
since Aug 2005
May 30th, 2007
0

Re: java

first find out how to print things.
next find 15 prime numbers (that's easy, there's sure to be lists of the thing, so no need to calculate them).

Combine the two and you have your solution.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
May 31st, 2007
0

Re: java

better search in google...
Reputation Points: 119
Solved Threads: 7
Practically a Posting Shark
vinod_javas is offline Offline
871 posts
since Feb 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Card dealing game
Next Thread in Java Forum Timeline: How do i creat folders using JAVA..





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC