0

I have an array, b[10];
i would like to add up all the values in that array and store the answer as wt.

any help?

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by firstPerson
0

Sorry, iv done it anyway :) just did it the long way
e.g wt = (bt[0] + bt[1] etc....

going to use a for loop to cut it down though

thanks anyway

Could we see some code...Your array, what type is it?

0

1) Do you know how to access the elements in the array
2) Do you know how to use a for loop
3) Do you know how to use add a value

If so then you know how to do it,
else ask about a even more specific question.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.