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
272380 Nguyễn Anh Khoa DÃY CON MA THUẬT C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 969 2023-11-21 10:51:45

Lỗi biên dịch:

Main.cc: In function ‘int main()’:
Main.cc:60:6: error: expected ‘;’ before ‘printf’
      printf("NO");
      ^~~~~~
Main.cc:59:5: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
     else(c==0)
     ^~~~
Main.cc:62:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’
  return 0;
  ^~~~~~
Main.cc: In function ‘void nhapmang(int*, int)’:
Main.cc:7:8: 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 giai(int*, int, int)’:
Main.cc:49:2: warning: control reaches end of non-void function [-Wreturn-type]
  }
  ^
Main.cc: In function ‘int main()’:
Main.cc:53:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&n);
     ~~~~~^~~~~~~~~