1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

to find a series of prime nos in between 1 to 500 by using recursive function

Discussion in 'C' started by deepak.mobisy, Oct 24, 2007.

  1. deepak.mobisy

    deepak.mobisy New Member

    Joined:
    Oct 24, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    ya man can any buddy help me to solve this problem..
    to find out prime nos from 1 to 500 by using recursive function in c.
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,285
    Likes Received:
    364
    Trophy Points:
    83
    I can help you with the algo.

    Check if no is divisible by 1 till the sqrt of the number.
    If yes not a prime
    else prime

    Now you can recurse through the check or can recurse it through the number 1 to 500
     
  3. deepak.mobisy

    deepak.mobisy New Member

    Joined:
    Oct 24, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    if u have a time then can u help me by puttong the code on y mail....
    ya i had tried for this ....
    but the result was unexpeceted..
    actually that prints a prime check only..
    ok thanks for giving me the information..
     

Share This Page