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
270398 Phạm Quang Nghĩa Luỹ thừa bậc 5 C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 523 2023-11-20 10:11:15

Lỗi biên dịch:

Main.cc: In function ‘long int KQ(int*, int)’:
Main.cc:17:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
Main.cc: In function ‘int main()’:
Main.cc:20:18: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘long int*’ [-Wformat=]
     scanf("%d",&n);
                ~~^
Main.cc:24:11: error: cannot convert ‘long int*’ to ‘int*’ for argument ‘1’ to ‘long int KQ(int*, int)’
     KQ(a,n);
           ^
Main.cc:20:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&n);
     ~~~~~^~~~~~~~~
Main.cc:22:14: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
         scanf("%ld",&a[i]);
         ~~~~~^~~~~~~~~~~~~