当前位置:网站首页>圆球等的相关计算
圆球等的相关计算
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;
}边栏推荐
- 压缩与解压缩命令
- Concours de segmentation des images gastro - intestinales de kaggle Baseline
- Pyinstaller打包pikepdf失败的问题排查
- 秒杀系统设计
- Tcwind mode setting
- 类加载机制与对象的创建
- SQL server2019 create a new SQL server authentication user name and log in
- 《数据安全法》出台一周年,看哪四大变化来袭?
- 2022 welder (elementary) special operation certificate examination question bank and answers
- Bluecmsv1.6 code audit
猜你喜欢

Bayesian inference problem, MCMC and variational inference

How strong a mathematical foundation does deep learning need?

Digital collection, ten thousand words long text, most of the questions you want to know have been clearly explained, which must be seen by practitioners

Ali open source (easyexcel)

计网 | 一文解析TCP协议所有知识点

如何获取飞机穿过雷达两端的坐标

【算法篇】刷了两道大厂面试题,含泪 ”重学数组“

Markdown mermaid種草(1)_ mermaid簡介

Bluecmsv1.6 code audit

Variational graph auto-encoders (VGAE)
随机推荐
【324. 摆动排序 II】
Concours de segmentation des images gastro - intestinales de kaggle Baseline
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
Markdown mermaid種草(1)_ mermaid簡介
Database learning notes (sql04)
颜色渐变的FontAwesome图标
QSP读取标签配置错误问题
echart:横向柱状图的类目文字位置调整
还在付费下论文吗?快来跟我一起白piao知网
rsync远程同步
Pipeline | and redirection >
Demo of intelligent computing system 2 bangc operator development (heterogeneous programming flow of CPU and mlu270)
Kaggle腸胃道圖像分割比賽baseline
Markdown drawing Mermaid practical tutorial
压缩与解压缩命令
[algorithm] I brushed two big factory interview questions and learned array again with tears in my eyes“
Grep text search tool
C语言局部变量与全局变量重名时的优先级问题(当局部变量和全局变量同时存在的时候,优先引用局部变量,而不去引用全局变量)
easypoi
Figure introduction to neural networks (GNN, GCN)