very simple check subarray sums if theyare equal

Discussion in 'C' started by fan434ever, Sep 13, 2007.

  1. fan434ever

    fan434ever New Member

    Joined:
    Jul 31, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    0
    how to recursively check subarrays of length n (of an array of length N) if they are equal ?

    eg indices,

    n= 2 -> 1+2=3+4=....
    n=5 -> 1+2+3+4+5=6+7+8+9+10=

    this is simple but i don't know how im new i just learn loop but i need its recursiveness

    thanks
     
  2. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    http://www.daweidesigns.com
    We're glad it's simple. We might wonder why, if it's so simple, you're asking the question.

    At any rate, we don't produce free homework here; we help you with problems with YOUR code. Produce some code. Read about code tags first, so you preserve your formatting (see the "Before you make a query" thread).
     
  3. fan434ever

    fan434ever New Member

    Joined:
    Jul 31, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    0
    I tell you the truth that when I was reading your post first time and your name,
    I was angry and wanted to tell you that "Sorry if you could pretend to be a gay male to attract gay community online on web coding messages, then I couldn't or could be anyone out there to waste people's time and boggle their mind, because I am not that type (perhaps fully feminine, straight man, or more beautiful -bisexual-)"

    But when I write this down, I have no idea in mind of that anymore, I really really want to respect to talk to you because you sometimes are very funny, you could make me smile a lot from time to time.

    I need to solve that problem with head and tail sums not just consecutive sums as explained above, there is an interesting thing I found from such a combination, I need to understand and write code to clearify it.

    I wonder how you look like when you laugh and talk etc. :) bye
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice