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
271281 Võ Anh Kiệt HUTECH IT OFFICE TOUR C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 751 2023-11-21 08:32:00

Lỗi biên dịch:

Main.cc: In function ‘void nhapn(int&, int&, int&)’:
Main.cc:9:20: error: expected ‘)’ before ‘;’ token
     scanf("%d",&han;
                    ^
Main.cc: In function ‘void nhapm(int&)’:
Main.cc:15:21: error: ‘a’ was not declared in this scope
         scanf("%d",&a[i]);
                     ^
Main.cc: In function ‘int main()’:
Main.cc:38:20: error: too many arguments to function ‘void nhapm(int&)’
     nhapm(n,han,k,a);
                    ^
Main.cc:13:6: note: declared here
 void nhapm(int &n){
      ^~~~~
Main.cc: In function ‘void nhapn(int&, int&, int&)’:
Main.cc:7:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&n);
     ~~~~~^~~~~~~~~
Main.cc:11:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&k);
     ~~~~~^~~~~~~~~
Main.cc: In function ‘int nhap(int, int, int, int*)’:
Main.cc:33:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^