Main.cc: In function ‘int main()’: Main.cc:6:16: error: conflicting declaration ‘double a [11]’ double a[11]={28.9,45.6,35,27.8,56,32.7,78,86.2,43,65}; ^ Main.cc:4:12: note: previous declaration as ‘double a’ double a=0; ^ Main.cc:10:19: error: invalid types ‘double[int]’ for array subscript a=a+(b*a[i]) ^