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
268783 Nguyễn Thanh Bảo Ngân Luỹ thừa bậc 5 C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 603 2023-11-18 20:36:14

Lỗi biên dịch:

Main.cc: In function ‘void check(int*, int)’:
Main.cc:12:24: error: ‘n’ was not declared in this scope
     for(int i = 0; i < n; i++){
                        ^
Main.cc: In function ‘int main()’:
Main.cc:26:5: error: expected ‘;’ before ‘}’ token
     }while (n < 1 || n > 1000);
     ^
Main.cc: In function ‘void nhap(int*, int)’:
Main.cc:8:14: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d", &a[i]);
         ~~~~~^~~~~~~~~~~~~
Main.cc: In function ‘int main()’:
Main.cc:25:14: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d", &n)
         ~~~~~^~~~~~~~~~