运行 ID: 6157

Main.cc: In function ‘int main()’:
Main.cc:6:20: error: ‘n’ was not declared in this scope
     for(int i=1;i<=n;i++){
                    ^
Main.cc:9:15: error: invalid operands of types ‘double [11]’ and ‘double’ to binary ‘operator*’
         s=s+(a*a[i]);
              ~^~~~~