题面

题意:给你一块长方形,告诉你长:宽=10:6 里面有一个圆,长:半径=5:1,给你长方形的长,求圆的面积和剩余部分的面积

题解:直接模拟输出就好

       

 1 #include<bits/stdc++.h>
 2 using namespace std;
 3 double x,y,r,pi=acos(-1);
 4 int T;
 5 int main()
 6 {
 7     scanf("%d",&T);
 8     while (T--)
 9     {
10         scanf("%lf",&x);
11         y=x/10*6;
12         r=x/5;
13         printf("%.2lf %.2lf\n",r*r*pi,x*y-r*r*pi);
14     }
15 }

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-30
  • 2021-10-26
  • 2021-11-13
猜你喜欢
  • 2022-02-16
  • 2022-12-23
  • 2021-08-27
  • 2021-06-26
  • 2021-08-23
  • 2022-12-23
  • 2021-07-15
相关资源
相似解决方案