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
268100 Nguyễn Công Quang Số PI C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 359 2023-11-18 19:50:13

Lỗi biên dịch:

Main.cc: In function ‘int main()’:
Main.cc:20:16: error: expected primary-expression before ‘||’ token
     while(n <= || n >= 5000) {scanf("%d",&n);}
                ^~
Main.cc: In function ‘void input(int&)’:
Main.cc:14:7: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&n);
  ~~~~~^~~~~~~~~
Main.cc: In function ‘int main()’:
Main.cc:19:14: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  int n; scanf("%d",&n);
         ~~~~~^~~~~~~~~
Main.cc:20:36: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     while(n <= || n >= 5000) {scanf("%d",&n);}
                               ~~~~~^~~~~~~~~