Mã chấm: 98062
Main.cc: In function ‘int nhapma(int*, int)’: Main.cc:8:27: warning: unknown conversion type character ‘]’ in format [-Wformat=] printf("nhap a[%]"); ^ Main.cc:11:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ Main.cc: In function ‘int co(int)’: Main.cc:15:13: error: ‘a’ was not declared in this scope if (a[i] < a[i+1] && a[i+1] > a[i+2]){ ^ Main.cc:16:16: error: assignment of function ‘int co(int)’ co=1; ^ Main.cc:16:16: error: cannot convert ‘int’ to ‘int(int)’ in assignment Main.cc:20:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ Main.cc: In function ‘int main()’: Main.cc:27:17: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘int’ [-Wformat=] scanf("%d",n); ^ Main.cc: In function ‘int nhapma(int*, int)’: Main.cc:9:14: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&a[i]); ~~~~~^~~~~~~~~~~~ Main.cc: In function ‘int main()’: Main.cc:27:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d",n); ~~~~~^~~~~~~~