# very simple check subarray sums if theyare equal

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

1. ### fan434everNew Member

Joined:
Jul 31, 2007
Messages:
12
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. ### DaWeiNew Member

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

3. ### fan434everNew Member

Joined:
Jul 31, 2007
Messages:
12
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