5 like 0 dislike

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
[Normal] Coding (C) - asked in Introduction to Computer Programming I (C) by (11.3k points)
Available when: Unlimited - Due to: Unlimited

retagged by | 5 views
Get it on Google Play Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:108.162.221.219
©2016-2019

Related questions

5 like 0 dislike
3 answers
[Normal] Coding (C) - asked Oct 10, 2017 in Introduction to Computer Programming I (C) by admin (9.8k points)
Available when: Unlimited - Due to: Unlimited
| 17 views
3 like 0 dislike
0 answers
[Normal] Coding (C) - asked Jan 25, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
Available when: Unlimited - Due to: Unlimited
| 3 views
6 like 0 dislike
2 answers
[Normal] Coding (C) - asked Oct 16, 2017 in Introduction to Computer Programming I (C) by thopd (11.3k points)
Available when: Unlimited - Due to: Unlimited
| 32 views
8,033 questions
60,929 answers
33,033 comments
1,100 users