foo.cc: In function 'int main()':
foo.cc:6:23: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'double*' [-Wformat=]
scanf("%d %d",&r1,&r2);
~~~ ^
foo.cc:6:23: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'double*' [-Wformat=]
foo.cc:7:23: error: invalid operands of types 'double' and 'double' to binary 'operator%'
r=r1*r2/(r1+r2)+r1*r2%(r1+r2);
~~~~~^~~~~~~~
foo.cc:6:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d",&r1,&r2);
~~~~~^~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务