![]() |
Add all elements of an array
OK, now I have a variable size array values[size]. I have so far managed to get the input. But now I am interested in a for loop to add all elements. One troubling thing is that it is a varying size array. Anyone could help me?
|
Re: Add all elements of an array
how have u got the input...u must be having some counter which tracks the number of inputs..why not try using the same counter for the output!!
|
Re: Add all elements of an array
Here's how:
Code:
#include <stdio.h> |
| All times are GMT +5.5. The time now is 04:48. |