generating of prime Numbers using java

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vrkraju
    New Member
    • Feb 2007
    • 6

    #1

    generating of prime Numbers using java

    one using for loop and
    using while loop
    2 programs
  • DeMan
    Top Contributor
    • Nov 2006
    • 1799

    #2
    OKAY, having solved this problem a couple of times in my life, I may be able to answer it.
    perhaps if you suggest how you intend to go about it, and where you have gotten so far, we may be able to point you vaguely toward the right direction....

    Comment

    • DeMan
      Top Contributor
      • Nov 2006
      • 1799

      #3
      And (in future) the JAVA forum might be the ideal place for this discussion (people in the Java forum tend to know java pretty well)

      Comment

      • vrkraju
        New Member
        • Feb 2007
        • 6

        #4
        No i am new to java and would like to see the programs can u proved me the programs

        Comment

        • vrkraju
          New Member
          • Feb 2007
          • 6

          #5
          generating prime numbers

          one using for loop and
          using while loop
          2 programs

          Comment

          • DeMan
            Top Contributor
            • Nov 2006
            • 1799

            #6
            If you would like some help, try to think about how you would go about solving this problem. No-one here will give you an answer showing how it is done, because you will never learn that way.
            If you think we may have a better/more efficient way, then post your code, and we might be able to offer a suggestion on how you could improve it (or concede thatyour way is better).
            We have no proof that any of us can actually program in Java (although the evidence with some of the replies given in different threads (r035198x (sorry if i missed a digit), horace1 and probaly countless others) implies there are people here who know what they're talking about.
            People here can help you to solve a problem, but if you want proof, I think there is plenty of evidence around....

            Comment

            • r035198x
              MVP
              • Sep 2006
              • 13225

              #7
              Originally posted by vrkraju
              one using for loop and
              using while loop
              2 programs
              Prime numbers are infinite. How many do you want to genrate?
              What have you done so far?

              Comment

              • vrkraju
                New Member
                • Feb 2007
                • 6

                #8
                they are infiniite ok but i would like to generate prime numbers for less than say 50

                Comment

                • DeMan
                  Top Contributor
                  • Nov 2006
                  • 1799

                  #9
                  What have you done so far? How would you/have you approach the problem?

                  Comment

                  • r035198x
                    MVP
                    • Sep 2006
                    • 13225

                    #10
                    Originally posted by vrkraju
                    they are infiniite ok but i would like to generate prime numbers for less than say 50
                    We are here to help you do it not do it for you. So get working on it, if you get stuck somewhere more specific you can ask about it here.

                    Comment

                    • vrkraju
                      New Member
                      • Feb 2007
                      • 6

                      #11
                      ya ok sure i will let u know if i am struck

                      Comment

                      • r035198x
                        MVP
                        • Sep 2006
                        • 13225

                        #12
                        Please do not double post.

                        Comment

                        • r035198x
                          MVP
                          • Sep 2006
                          • 13225

                          #13
                          Originally posted by r035198x
                          Please do not double post.
                          Threads merged.

                          Comment

                          Working...