display prime numbers

lost the plot here!

Page 1 of 1

2 Replies - 1656 Views - Last Post: 11 March 2008 - 04:43 AM Rate Topic: -----

#1 bettyboo  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 10-March 08

display prime numbers

Post icon  Posted 10 March 2008 - 05:09 PM

:blink:

have to display the first 50 prime numbers in 5 lines, i realise that positive divisor is 1 or itself.
I think 10 primes per line?

not done anything like this after 3 clases so can't really suggest code. can someone give me a start on this

int gcd = .....
Is This A Good Question/Topic? 0
  • +

Replies To: display prime numbers

#2 Jayman  Icon User is offline

  • Student of Life
  • member icon

Reputation: 418
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: display prime numbers

Posted 10 March 2008 - 09:07 PM

I highly recommend that you use the search feature in the future, it is in the upper right corner of every page. You will be amazed at the amount of stuff you can find. Also, you should check out our Snippets and Tutorials forums. There is a ton of code examples to satisfy many needs for assignments and projects.

To get you started here is what you are looking for: GCD and LCM Java snippet
Was This Post Helpful? 0
  • +
  • -

#3 bettyboo  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 10-March 08

Re: display prime numbers

Posted 11 March 2008 - 04:43 AM

thanks, will get to grips with this, appreciate the help
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1