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
269623 Nguyễn Đăng Khoa Số PI C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 323 2023-11-18 21:45:08

Lỗi biên dịch:

Main.cc: In function ‘int main()’:
Main.cc:12:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i=1;i<=n;i++)
                 ~^~~
Main.cc:14:25: error: unable to find numeric literal operator ‘operator""i’
         m+=pow((-1),i)/(2i+1);
                         ^~
Main.cc:14:25: note: use -std=gnu++11 or -fext-numeric-literals to enable more built-in suffixes
Main.cc:10:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&n);
     ~~~~~^~~~~~~~~