Compile Error

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)提供评测服务

信息

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