Mã chấm: 269585
Main.cc: In function ‘int tinhtoan(char*, int)’: Main.cc:14:27: warning: for increment expression has no effect [-Wunused-value] for(int i = 0; i < n;-1; i++){ ^ Main.cc:14:28: error: expected ‘)’ before ‘;’ token for(int i = 0; i < n;-1; i++){ ^ Main.cc:14:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] for(int i = 0; i < n;-1; i++){ ^~~ Main.cc:14:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ for(int i = 0; i < n;-1; i++){ ^ Main.cc:14:30: error: ‘i’ was not declared in this scope Main.cc:22:28: error: expected ‘;’ before ‘i’ for(int i = 0; i < n-1 i++){ ^ Main.cc: In function ‘void nhap(char*, int)’: Main.cc:9:14: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%c",&a[i]); ~~~~~^~~~~~~~~~~~ Main.cc: In function ‘int main()’: Main.cc:35:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &n); ~~~~~^~~~~~~~~~