java

Reply

Join Date: May 2007
Posts: 2
Reputation: aneetasuneel is an unknown quantity at this point 
Solved Threads: 0
aneetasuneel aneetasuneel is offline Offline
Newbie Poster

java

 
0
  #1
May 30th, 2007
how to write a program to print first 15 prime nos in java?
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 262
Reputation: Dukane is an unknown quantity at this point 
Solved Threads: 22
Dukane's Avatar
Dukane Dukane is offline Offline
Posting Whiz in Training

Re: java

 
0
  #2
May 30th, 2007
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.
It is very important to read this: http://www.catb.org/~esr/faqs/smart-questions.html
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: java

 
0
  #3
May 30th, 2007
>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?
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: java

 
0
  #4
May 30th, 2007
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.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 871
Reputation: vinod_javas is an unknown quantity at this point 
Solved Threads: 7
vinod_javas's Avatar
vinod_javas vinod_javas is offline Offline
Practically a Posting Shark

Re: java

 
0
  #5
May 31st, 2007
better search in google...
Adios,

Vinod......
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC