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
13999 Đinh Lê Tuấn Hưng Số nguyên không âm đẹp C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 432 2022-12-29 20:29:52

Lỗi biên dịch:

Main.c:3:16: error: expected ‘;’, ‘,’ or ‘)’ before ‘&’ token
 void NhapN(int &n) {
                ^
Main.c:7:24: error: expected ‘;’, ‘,’ or ‘)’ before ‘&’ token
 void NhapSo(int n, int &d, int &m) {
                        ^
Main.c:12:15: error: expected ‘;’, ‘,’ or ‘)’ before ‘&’ token
 int DemSL(int &d, int &m) {
               ^
Main.c: In function ‘main’:
Main.c:24:2: warning: implicit declaration of function ‘NhapN’ [-Wimplicit-function-declaration]
  NhapN(n);
  ^~~~~
Main.c:25:2: warning: implicit declaration of function ‘NhapSo’ [-Wimplicit-function-declaration]
  NhapSo(n,d,m);
  ^~~~~~
Main.c:26:2: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
  printf("\n%d",DemSL(d,m));
  ^~~~~~
Main.c:26:2: warning: incompatible implicit declaration of built-in function ‘printf’
Main.c:26:2: note: include ‘’ or provide a declaration of ‘printf’
Main.c:26:16: warning: implicit declaration of function ‘DemSL’ [-Wimplicit-function-declaration]
  printf("\n%d",DemSL(d,m));
                ^~~~~