### Average from array keeps returning address? for my hw assignment, i had to write a program with 2 functions and an array to gather grades and then calculate the average of the grades. I am currently stuck on getting the average, as it seems to be printing the address of the array rather than the average of the numbers being inputted by the user. below is my code, thank you in advance for any help!

**code has been edited. now i recieve NO value rather than the address.

 ``12345678910111213141516171819202122232425262728293031323334353637383940414243444546`` `````` #include using namespace std; // function and array declaration void getData(); void findAverage(); const int SIZE = 10; float allGrades[SIZE]; //main begins ------------------------------------------------- int main() { cout << "here we will find the average of your grades \n"; cout << "please enter your grades below" << endl; getData(); cout << endl << "the average grade is: "; findAverage; return 0; } // main ends -------------------------------------------------- void getData() { int i = 0; //increment int for (int i = 0; i < 10; i++) { cout << "enter a grade: "; cin >> allGrades[i]; } } void findAverage() { int i = 0; // increment int double sum = 0, avg; for (int i = 0; i < 10; i++) { sum += allGrades[i]; } avg = sum / 10; cout << avg; } ``````
Last edited on divide only once, not every loop, in find average. didnt even notice that, thanks for the help with that, but it is still returning the address rather than the value for some reason. i am not sure what i'm doing wrong at this point so after testing by removing the findAverage function and just declaring it in main, I am pretty sure my issue is in the call to findAverage, but i am unsure where i am going wrong. it still sends the address of the array rather than the average calculated by the function. findaverage call line 19 needs () wow, yup that did it right there! been driving me nuts trying to figure it out lol. thanks for your help jonnin!