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
268822 Hà Hữu Diễm Tú Số PI C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 363 2023-11-18 20:39:31

Lỗi biên dịch:

Main.cc: In function ‘int main()’:
Main.cc:7:13: error: expected initializer before ‘<=’ token
     double n<=5000;
             ^~
Main.cc:8:17: error: ‘n’ was not declared in this scope
   scanf("%ld", &n);
                 ^
Main.cc:8:17: note: suggested alternative: ‘yn’
   scanf("%ld", &n);
                 ^
                 yn
Main.cc:21:21: warning: '0' flag ignored with precision and ‘%d’ gnu_printf format [-Wformat=]
  printf("%0.5ld", PI);
                     ^
Main.cc:21:21: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘double’ [-Wformat=]