Prime Numbers


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Prime Numbers

  1. #1
    Join Date
    Oct 2002
    Posts
    1

    Prime Numbers

    Hi,
    I have toubles with a prog. I don't know how to do it! It would be so nice if someone could help me.

    I have to find an algorithm to calculate all prime numbers (zB.: 2,3,5,7,11,13,...) of an Inputnumber. For example: 8!
    8:2=4 4:2=2 2 is a prime number.

    The output shout be systematic. Those who are the most should be displayed at first.

    Thanks for your help!

  2. #2
    Join Date
    Sep 2002
    Posts
    78
    i made a prog like this once but in c not java, its a lot like java i'll attach the file so you can have a look, good luck
    Attached Files Attached Files
    ¿Red Baron?
    [code] /* dont forget code tags! */ [/code]
    Come visit the Café!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center