9 条题解

  • 2
    @ 2023-10-6 17:09:07
    #include <iostream>
    #include <iomanip>
    using namespace std;
    int main()
    {
        double pi = 3.1415926, r, h;
        cin >> r >> h;
        cout << fixed << setprecision(2) << pi * r * r * 2 + pi * 2 * r * h;
        return 0;
    }
    
    • 1
      @ 2023-7-26 14:44:32

      对瓦而言,这道题无需动脑子代码如下:

      #include<bits/stdc++.h>
      using namespace std;
      int main(){
      	//定义并输入两个实数表示圆柱体的底面半径r和h 
      	int a,b;cin>>a>>b; 
      	//定义p代表圆周率3.1415926
      	double p=3.1415926;
      	//输出圆柱表面积并保留两位小数
      	cout<<fixed<<setprecision(2)<<2*p*a*(a+b); 
      	return 0;
      }
      
      • 0
        @ 2023-10-28 19:00:23
        #include <cstdio>
        using namespace std;
        int main(){
            const double pi=3.1415926;
            int r,h;
            scanf("%d%d",&r,&h);
            printf("%.2f\n",r*r*pi*2+pi*2*r*h);
            return 0;
        }
        
        • 0
          @ 2023-10-1 12:06:28
          #include<bits/stdc++.h>
          using namespace std;
          double r,h,p,s;
          int main()
          {
              cin>>r>>h;
              p=3.1415926;
              s+=p*r*r*2;
              s+=p*2*r*h;
              cout<<fixed<<setprecision(2)<<s;
              return 0;
          }
          
          • 0
            @ 2023-9-8 21:34:25
            #include<bits/stdc++.h>
            using namespace std;
            int main()
            {
                double c,b,d;
                cin >> b >> d;
                c = 3.1415926 * 2 * b * d;
                b = 3.1415926 * b * b * 2;
                d = c + b;
                printf("%.2f",d);
                return 0;
            }
            

            A

            • 0
              @ 2023-8-23 12:24:40

              过辣!

                  double r,h;
                  cin>>r>>h;
                  //圆柱表面积公式:S表=S侧+2S底
                  //                =2πrh+2πr²
                  cout<<fixed<<setprecision(2)<<2*3.1415926*r*h+2*3.1415926*pow(r,2);
              
              • @ 2024-5-28 20:09:40

                我也承诺此代码有101%的bug,可999年WA通过 列表: #1:Wrong Answer -1分 TEL:3141592653589793Hour 1024TB System Wornning: C:\ 99.98GB/99.98GB D:\1023.982GB/1023.982GB Today Is 2097年13月32 下面省略。。。

            • 0
              @ 2023-3-7 20:35:07

              六年级传统数学题

              #include<bits/stdc++.h>
              using namespace std;
              int main()
              {
                  int r, n;
                  cin >> r >> n;
                  double k = r * r * 3.1415926 * 2 + 3.1415926 * 2 * r * n;
                  cout << fixed << setprecision(2) << k;
                  return 0;
              }
              
              • 0
                @ 2023-3-3 19:50:28

                首先,补充一个圆柱体表面积公式:

                2πr²+2πrh (其实就是俩底面积和侧面积)(小学6下知识,忘了自己翻课本(有端))

                代码也很简单,输入俩数(double),套公式

                唯一的,cout << fixed << setprecision(2) << xxx << endl; (<iomanip>)

                代码原文如下

                #include <iostream>//hetao3097453
                #include <iomanip>//!!!!!!!!!!!!!
                using namespace std;
                int main()
                {
                    double r,h,p = 3.1415926;
                    cin >> r >> h;
                    double sum1 = p * r * r * 2;//两部分,最后相加。想用一个整一下就行
                    double sum2 = p * r * 2 * h;
                    double sum = sum1 + sum2;
                    cout << fixed << setprecision(2) << sum << endl;
                    return 0;
                }
                
                

                hetao3097453(bililili @ 一钩出站)

                2023年3月3日

                • 0
                  @ 2022-12-12 20:17:42
                  #include<bits/stdc++.h>
                  using namespace std;
                  int main()
                  {
                  	int r, h;
                  	double pi = 3.1415926;
                  	cin >> r >> h;
                  	cout << fixed << setprecision(2);
                  	cout << 2 * r * pi * h + r * r * pi * 2; 
                  	return 0;
                  }
                  
                  • 1

                  信息

                  ID
                  620
                  时间
                  1000ms
                  内存
                  16MiB
                  难度
                  3
                  标签
                  递交数
                  196
                  已通过
                  106
                  上传者