0_0_30159809_2814.cpp: In function 'int main()': 0_0_30159809_2814.cpp:21:4: error: expected ',' or ';' before 'double' double sum=0; ^ 0_0_30159809_2814.cpp:24:5: error: 'sum' was not declared in this scope sum+=buf[i]; ^