5 喜歡 0 不喜歡
156 瀏覽

Write a program that computes the volume of a sphere with a radius, using the formula v=(4.0/3.0)*r*r*r*3.141592 . Remember to keep the fraction 4.0/3.0 but not 4/3
The program should output 2 digits after decimal point.

寫一個計算球形體積程式,用這個公式v=(4.0/3.0)*r*r*r*3.141592。

分數寫法4.0/3.0而不是4/3

Example input:

10

Example output:

4188.79
[正常] Coding (C) - 最新提問 分類:Introduction to Computer Programming I (C) | 用戶: (12.1k 分)
ID: 25996 - 從幾時開始: 無限制 - 到幾時結束: 無限制

標籤修改 用戶: | 156 瀏覽
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.70.34.133
©2016-2024

相關問題

5 喜歡 0 不喜歡
3 回答
[正常] Coding (C) - 最新提問 10月 10, 2017 分類:Introduction to Computer Programming I (C) | 用戶: admin (9.9k 分)
ID: 25955 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 167 瀏覽
3 喜歡 0 不喜歡
0 回答
[正常] Coding (C) - 最新提問 1月 25, 2017 分類:Introduction to Computer Programming I (C) | 用戶: The Contributor (20.9k 分)
ID: 21795 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 99 瀏覽
12,783 問題
183,443 回答
172,219 留言
4,824 用戶