Mã chấm: 268475
Main.cc: In function ‘double pi(int)’: Main.cc:7:6: warning: pointer to a function used in arithmetic [-Wpointer-arith] pi += (i%2==0?1:-1)/(2*i+1); ~~~^~~~~~~~~~~~~~~~~~~~~~~~ Main.cc:7:29: error: assignment of read-only location ‘pi’ pi += (i%2==0?1:-1)/(2*i+1); ^ Main.cc:7:29: error: cannot convert ‘double (*)(int)’ to ‘double(int)’ in assignment Main.cc: In function ‘int main()’: Main.cc:15:8: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%ld", &n); ~~~~~^~~~~~~~~~~