kotlin 查找id

Formula to find volume of Sphere: volume =(4/3)*PI*r^3

查找球体体积的公式: volume =(4/3)* PI * r ^ 3

Given the value of radius, we have to find the volume of Sphere.

给定半径的值,我们必须找到球体的体积。

Example:

例:

    Input:
radius = 7
Output:
volume = 1436.7550402417319

程序在Kotlin中查找Sphere的体积 (Program to find volume of Sphere in Kotlin)

package com.includehelp
import java.util.*
import kotlin.math.pow
//Main Function , Entry point of Program
fun main(args: Array<String>) {
//Input Stream
val scanner = Scanner(System.`in`)
//Input Radius
print("Enter Radius of Sphere : ")
val radius = scanner.nextDouble()
//Sphere Volume
val sphereVolume = (4.0/3.0)*Math.PI*radius.pow(3)
//Print Volume
println("Sphere Volume on radius $radius is : $sphereVolume")
}

Output

输出量

Run 1:
Enter Radius of Sphere : 7
Sphere Volume on radius 7.0 is : 1436.7550402417319
---
Run 2:
Enter Radius of Sphere : 21
Sphere Volume on radius 21.0 is : 38792.38608652676

翻译自: https://www.includehelp.com/kotlin/find-volume-of-sphere.aspx

kotlin 查找id

kotlin 查找id_Kotlin程序查找Sphere的体积相关推荐

  1. kotlin 查找id_Kotlin程序查找矩阵的转置

    kotlin 查找id A transpose of a matrix is simply a flipped version of the original matrix. We can trans ...

  2. kotlin 查找id_Kotlin程序查找给定范围内的素数

    kotlin 查找id A prime number is a natural number that is greater than 1 and cannot be formed by multip ...

  3. kotlin 查找id_Kotlin程序查找立方体区域

    kotlin 查找id A cube has 6 square faces, if edges length is side. Then the area of each square is side ...

  4. kotlin 查找id_Kotlin程序查找等边三角形的区域

    kotlin 查找id Formula to find area of Equilateral Triangle: area = ( 1.73 × side × side)/4 查找等边三角形面积的公 ...

  5. kotlin 查找id_Kotlin程序查找平行四边形的区域

    kotlin 查找id Formula to find area of Parallelogram: area = base*height 查找平行四边形面积的公式: area = base * he ...

  6. kotlin 查找id_Kotlin程序查找圆柱体区域

    kotlin 查找id A cylinder is a three-dimensional structure which has circular bases parallel to each ot ...

  7. kotlin 查找id_Kotlin程序查找Square区域

    kotlin 查找id Formula to find area of Square: area = side*side 查找Square面积的公式: area = side * side Given ...

  8. kotlin 查找id_Kotlin程序在矩阵中查找偶数和奇数的频率

    kotlin 查找id Given a matrix, we have to find frequencies of even and odd numbers. 给定一个矩阵,我们必须找到偶数和奇数的 ...

  9. 微信小程序 查找兄弟节点_使用C ++程序在链接列表中查找节点

    微信小程序 查找兄弟节点 Given a linked list and an integer N, you need to find and return index where N is pres ...

最新文章

  1. Mac vscode 调试打印有问题 输出缓冲区 “\r\n“
  2. Hakase and Nano(博弈)
  3. checkStyle -- 代码风格一致
  4. android 访问服务器sql_XSS 攻击、CSRF 攻击、SQL 注入、流量劫持(DNS 劫持、HTTP 劫持)—— 浏览器安全
  5. Oracle 19c 新特性:ADG的自动DML重定向增强读写分离
  6. 【Spring】Could not commit JPA transaction RollbackException: Transaction marked as rollbackOnly
  7. python字典长度可变吗_关于在Python3中:字典在迭代过程中,字典的长度是不允许改变的...
  8. mysql怎么分组计算逾期率_转行数据分析第三篇:mysql查询入门练习题
  9. 【UWP通用应用开发】控件、应用栏
  10. Zabbix自定义监控、自动报警
  11. 20200705每日一句
  12. 医疗中的ai_医疗保健中自主AI的障碍
  13. 阿里云短信发送SDK
  14. javascript 字符串分割的方法总结区分
  15. Java 常用的依赖包
  16. 苹果ipad怎么刷机_白苹果如何修复,为什么会出现白苹果
  17. 如何在html中做超链接,如何在HTML上做一个超链接?
  18. 跟狗屎一样的代码,到底该如何重构?
  19. BLOCK PVSE 230/24-5电源acim-jouanin AJ7003.J.2000温度传感器
  20. 重构26-Remove Double Negative(去掉双重否定)

热门文章

  1. html引用本地图片不能是桌面的,Img标签与本地文件:/// URL不显示在Microsoft Edge Web浏览器...
  2. c语言提取七位数讲解,C语言-体育彩票7位数,感受身中500万的fell
  3. 利用pyinstaller打包python3程序
  4. Problem D: 栈的基本运算(栈和队列)
  5. UVA - 1589 ​​​​​​​Xiangqi
  6. java.util (Collection接口和Map接口)
  7. Gartner: 2017年11大信息安全技术(解读版)
  8. CentOS7入门_安装并配置mysql5.7.18
  9. Eucalyptus常用查询命令
  10. php mysql登陆页面完整代码_求助:PHP实现登陆注册的代码是什么啊(主要是数据库那块)?...