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
267922 Lê Dương Định Xuân Số PI C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 307 2023-11-18 19:35:43

Lỗi biên dịch:

Main.cc: In function ‘int main()’:
Main.cc:11:14: error: expected unqualified-id before ‘=’ token
     for (int = 0; i <= n; i++){
              ^
Main.cc:11:14: error: expected ‘;’ before ‘=’ token
Main.cc:11:14: error: expected primary-expression before ‘=’ token
Main.cc:11:19: error: ‘i’ was not declared in this scope
     for (int = 0; i <= n; i++){
                   ^
Main.cc:11:25: error: expected ‘)’ before ‘;’ token
     for (int = 0; i <= n; i++){
                         ^
Main.cc:11:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
     for (int = 0; i <= n; i++){
     ^~~
Main.cc:11:27: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
     for (int = 0; i <= n; i++){
                           ^
Main.cc:11:27: error: ‘i’ was not declared in this scope