### Beginner need help with code!!

I have this assigntment and I think I got most of it right but I keep getting an error/warning when I try to compile the program

On line 24 I get the error and I don't know what to do this is what it keeps telling me

[Warning] passing `double' for converting 1 of `void displaySumAverage(int, double)'

I can't figure out how to fix it

 ``123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172`` ``````#include #include #include using namespace std; int sumAverage(int times, int value, double sum, double average); void displaySumAverage(int displaySum, double displayAverage); int main() { int times, value, loop; double sum, average; while(loop != 0) { loop = sumAverage(times, value, sum, average); if (loop == 0) break; displaySumAverage(sum, average); } system("pause"); return 0; } int sumAverage(int times, int value, double sum, double average) { sum = 0; cout << "How many numbers would you like to average? (Enter \"0\" to terminate) "; cin >> times; for(int count = 0; count < times; count++) { cout << " Enter a value to be added to the sum "; cin >> value; sum += value; cout << endl ; } if (times!=0) average = sum / times; else cout << "Program Terminated "; return times; } void displaySumAverage(int displaySum, double displayAverage) { cout << " The sum of the entered values is: " << displaySum; cout << " The average of the entered values is: " << setprecision(1) << showpoint << fixed << displayAverage <
your function prototype for "displaySumAverage" has an int listed, change this to a double. Do the same in your function parameter list as well. (line 63)
Thank you!!

Okay I changed them to doubles and now my compiler doesn't display the error, but it won't run the program. I click compile and run in dev C++ and the program screen won't show up.
Topic archived. No new replies allowed.