Main.cc: In function 'int main()':
Main.cc:13:3: error: 'b' was not declared in this scope
b = b + a[i];
^
Main.cc:22:27: error: 'b' was not declared in this scope
printf("%d %.2lf %d %d", b, b * 1.0 / n, max, min);
^