I have tried several times to make minor tweaks to the program, but nothing seems to work, i finally ended with
as soon as i can figure out how to get a value other than 0, i will add in the "/list1.size()" after the return sum line.Code:double Mean(vector<double> L) { double sum=0; vector<double> list1; for(int i=0;i<list1.size();i++) {sum=sum+list1[i];} return sum; }