Compile Error

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

信息

递交者
类型
递交
题目
P1651 物理竞赛
语言
C++
递交时间
2021-12-22 17:48:48
评测时间
2021-12-22 17:48:48
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes