运行 ID: 31097

Main.cc: In function ‘int cal(int, int)’:
Main.cc:9:15: warning: left operand of comma operator has no effect [-Wunused-value]
  for(int i=x;i<=y,i++){
              ~^~~
Main.cc:9:22: error: expected ‘;’ before ‘)’ token
  for(int i=x;i<=y,i++){
                      ^
Main.cc: In function ‘int main()’:
Main.cc:18:8: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d",&d[i]);
   ~~~~~^~~~~~~~~~~~