how can I add the values of an array using a for loop?
this is my code
---------------------------------------------------------------------------
#include <iostream>
int main()
{
int sum=0;
int a[100];
for (int count=1; count<100; count++)
cout<<"element #: "<<count<<endl;
sum += a[count++];
cout<<"sum is: "<<sum<<endl;
return 0;
}
--------------------------------------------------------------------------
Thank you all for your help