i have a as an array
b also .. how can i find the summation of there content ..

thank you ..

and the result would be in another array .. c for example

Assuming that a b and c are all the same length...
you want every element of c to be the sum of the corresponding elements in and b. Is that right?

Here's a hint. you need exactly one loop.

no .. i ment you've two arrays A and B ..

summation of there elements needed to be in a third array C .. :)

That sounds like exactly what I said. Maybe an example?
If A is {1,2,3} and B is {4,5,6} what should C be?

aha .. that wht i ment :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.