Compile Error

foo.cc: In function ‘int main()’:
foo.cc:7:24: error: lvalue required as unary ‘&’ operand
    7 |         printf("%4lf",&2*r);
      |                        ^
foo.cc:8:24: error: lvalue required as unary ‘&’ operand
    8 |         printf("%4lf",&2*r*pi);
      |                        ^
foo.cc:9:26: error: invalid operands of types ‘int*’ and ‘float’ to binary ‘operator*’
    9 |         printf("%4lf",&pi*r*r)
      |                       ~~~^~
      |                       |   |
      |                       |   float
      |                       int*

信息

递交者
类型
递交
题目
P2318 1.3.9:与圆相关的计算
语言
C++
递交时间
2025-07-20 17:06:00
评测时间
2025-07-20 17:06:00
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes