Mã chấm Tài khoản Bài tập Ngôn ngữ lập trình Trạng thái Thời gian Bộ nhớ Kích thước Thời gian nộp
269540 Nguyễn Khánh Ly Số PI C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 305 2023-11-18 21:38:57

Lỗi biên dịch:

Main.cc: In function ‘int main()’:
Main.cc:10:17: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘int’ [-Wformat=]
     scanf("%d",n);
                 ^
Main.cc:12:35: error: expected ‘)’ before ‘;’ token
      pi= pi+((pow(-1,i)/((2*i)+1));
                                   ^
Main.cc:10:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",n);
     ~~~~~^~~~~~~~