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
268980 Trang Tuấn Huy Số PI C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 333 2023-11-18 20:50:45

Lỗi biên dịch:

Main.cc: In function ‘int main()’:
Main.cc:13:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
         for(int i=1;i<=n;i++)
         ^~~
Main.cc:15:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
             printf("%d",)
             ^~~~~~
Main.cc:15:25: error: expected primary-expression before ‘)’ token
             printf("%d",)
                         ^
Main.cc:11:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&n);
     ~~~~~^~~~~~~~~