Mã chấm: 99480
Main.cc: In function ‘int main()’: Main.cc:23:9: warning: init-statement in selection statements only available with -std=c++1z or -std=gnu++1z if (a[0]>(a[n-1]+a[n-2]) ^ Main.cc:24:9: error: expected ‘;’ before ‘printf’ printf("CO") ^~~~~~ Main.cc:23:13: warning: statement has no effect [-Wunused-value] if (a[0]>(a[n-1]+a[n-2]) ~~~~^~~~~~~~~~~~~~~~ Main.cc:26:5: error: expected primary-expression before ‘return’ return 0; ^~~~~~ Main.cc:26:5: error: expected ‘)’ before ‘return’ 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:21:8: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&a[i]); ~~~~~^~~~~~~~~~~~