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 (12k points)
Available when: Unlimited - Due to: Unlimited

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

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.9k points)
Available when: Unlimited - Due to: Unlimited
| 66 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
| 25 views
11,166 questions
132,626 answers
131,350 comments
3,823 users