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
269695 Vũ Duy Sơn Luỹ thừa bậc 5 C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 552 2023-11-18 21:51:27

Lỗi biên dịch:

Main.cc: In function ‘int main()’:
Main.cc:20:5: error: expected ‘;’ before ‘for’
     for(int i=1;i<=T;i++)
     ^~~
Main.cc:20:17: error: ‘i’ was not declared in this scope
     for(int i=1;i<=T;i++)
                 ^
Main.cc:16:9: warning: unused variable ‘c’ [-Wunused-variable]
     int c,T;
         ^
Main.cc:17:11: warning: unused variable ‘b’ [-Wunused-variable]
     float b,a[1000];
           ^
Main.cc: In function ‘void nhap(float*, int)’:
Main.cc:10:14: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
         scanf("%f",&a[i]);
         ~~~~~^~~~~~~~~~~~
Main.cc: In function ‘int main()’:
Main.cc:18:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&T);
     ~~~~~^~~~~~~~~