Mã chấm: 268865
Main.cc: In function ‘void nhapMang(int*, int)’: Main.cc:9:19: warning: format ‘%f’ expects argument of type ‘float*’, but argument 2 has type ‘int*’ [-Wformat=] scanf("%f",&a[i]); ~~~~~^ Main.cc: In function ‘int main()’: Main.cc:31:19: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘double*’ [-Wformat=] scanf("%d", &n); ~~^ Main.cc:32:18: error: cannot convert ‘double*’ to ‘int*’ for argument ‘1’ to ‘void nhapMang(int*, int)’ nhapMang(a, n); ^ Main.cc:33:24: error: cannot convert ‘double*’ to ‘int*’ for argument ‘1’ to ‘void kiemTraLuyThua(int*, int)’ kiemTraLuyThua(a, n); ^ Main.cc:29:21: warning: unused variable ‘b’ [-Wunused-variable] double a[MAX],n,b; ^ Main.cc: In function ‘void nhapMang(int*, int)’: Main.cc:9:8: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%f",&a[i]); ~~~~~^~~~~~~~~~~~ Main.cc: In function ‘int main()’: Main.cc:31:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &n); ~~~~~^~~~~~~~~~