当前位置:网站首页>圆球等的相关计算
圆球等的相关计算
2022-06-28 19:51:00 【Zaltana】
请编写一个简单程序,输入半径和高,输出圆周长,圆面积,球面积,球体积,圆柱体积。(PI=3.1415926)
格式
输入格式:输入为double型
输出格式:分行输出,保留2位小数
样例
输入:1.5 3
输出:9.42
7.07
28.27
14.14
21.21
#include<bits/stdc++.h>
using namespace std;
int main( )
{
double a,b;
scanf("%lf",&a);
scanf("%lf",&b);
printf("%0.2lf\n",3.1415926*2*a) ;
printf("%0.2lf\n",3.1415926*a*a) ;
printf("%0.2lf\n",3.1415926*a*a*4) ;
printf("%0.2lf\n",3.1415926*a*a*a*4/3) ;
printf("%0.2lf\n",3.1415926*a*a*b) ;
return 0;
}边栏推荐
- Tcwind mode setting
- Configuration du mode tcwind
- [go language questions] go from 0 to entry 5: comprehensive review of map, conditional sentences and circular sentences
- On the first anniversary of the data security law, which four major changes are coming?
- H5 sunflower operation
- 秒杀系统设计
- 数字藏品,万字长文,你想知道的大部分问题都讲清楚了从业者必看
- C语言局部变量与全局变量重名时的优先级问题(当局部变量和全局变量同时存在的时候,优先引用局部变量,而不去引用全局变量)
- How strong a mathematical foundation does deep learning need?
- echart:横向柱状图的类目文字位置调整
猜你喜欢

集合之ArrayList

easypoi

Markdown mermaid种草(1)_ mermaid简介

为什么C语言用使用其他文件的结构体变量时,声明结构体别名还不行,必须使用本名?(使用别名时不能加struct)

UESTC (shenhengtao team) & JD AI (Mei Tao team) proposed a structured dual stream attention network for video Q & A, with performance SOTA! Better than the method based on dual video representation

Bayesian Reference problem, mCMC and variational reference

Lecture 30 linear algebra Lecture 4 linear equations

bluecmsv1.6代码审计

Rsync remote synchronization

Number theory -- detailed proof of Euler function, sieve method for Euler function, Euler theorem and Fermat theorem
随机推荐
压缩与解压缩命令
Severity code description project file line suppress status error lnk2038 detected a mismatch of "runtimelibrary": the value "md\u dynamicrelease" does not match the value "mdd\u dynamicde"
How to obtain the coordinates of the aircraft passing through both ends of the radar
1002_20181019
5g NR MBS architecture introduction
数字藏品,万字长文,你想知道的大部分问题都讲清楚了从业者必看
2342
2788.Cifera
Why is it not enough to declare the structure alias when using the structure variable of other files in C language, and the proper name must be used? (cannot add struct when using alias)
jsp中获取session中的值
How strong a mathematical foundation does deep learning need?
C#应用程序界面开发基础——窗体控制
裁员真能拯救中国互联网?
2022年T电梯修理考试题库模拟考试平台操作
F (x) construct the equation, calculate the partial derivative by gradient descent, determine the partial derivative adjustment by loss function, and deal with nonlinear problems by activation functio
5G NR MBS架构介绍
Quaternion quaternion and Euler angle transformation in ROS
QSP read label configuration error
Past blue bridge cup test questions ants catch cold
SQL server2019 create a new SQL server authentication user name and log in