foo.cc: In function 'int main()':
foo.cc:10:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lf%lf%lf%lf%d",
~~~~~^~~~~~~~~~~~~~~~~~~
&d1,&c,&d2,&(p[0]),&n);
~~~~~~~~~~~~~~~~~~~~~~
foo.cc:13:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lf%lf",&(d[i]),&(p[i]));
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务