Ok so i have an int array that looks like this:
int money[] = {};
and then I added values to that array by doing scanf, and then added each scanf value to the array with a for-loop, ONE number at a time:
for (int i = 0; i < 1; i++)
{
money[i] = currentPrice;
}
So after doing this a few times (with scanf) my array looks like this:
money[] = {50, 75, 1, 40, 4};
How can I use a for-loop to go through all elements in the list and add them together and print them out?
int total = blablabla.......
printf(total);