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

Lỗi biên dịch:

Main.cc: In function ‘void KQ(int*, int)’:
Main.cc:10:24: error: return-statement with a value, in function returning 'void' [-fpermissive]
                 return 1;
                        ^
Main.cc:12:24: error: return-statement with a value, in function returning 'void' [-fpermissive]
                 return 0;
                        ^
Main.cc: In function ‘int main()’:
Main.cc:23:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
     if(KQ==1)
            ^
Main.cc:18:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&n);
     ~~~~~^~~~~~~~~
Main.cc:20:14: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d",&a[i]);
         ~~~~~^~~~~~~~~~~~