0020 --- obtain the cone volume

Source: Internet
Author: User

Obtain the volume of the Cone
Difficulty level: A; running time limit: 1000 ms; running space limit: KB; code length limit: B
Question description
The radius R and H of the bottom side of the input cone (both do not exceed 50), and the volume V of the cone is output.
Input
Two numbers R and H are separated by a space.
Output
One number, V
Input example
3 7
Output example
65.94
Other Instructions
Note: The bottom of the cone is a circle. The volume of the cone is equal to the bottom area of the cone multiplied by the height and divided by 3. Here, the circumference rate is 3.14 When the area of the circle is calculated, and the variables used use the double type.

The cone volume is 1/3 of the height of the same bottom column.

Directly add the code.

The Code is as follows:

# Include <iostream> # include <cmath> using namespace STD; int main () {double A, B; CIN> A> B; cout <3.14 * a * B/3 <Endl; return 0 ;}

0020 --- obtain the cone volume

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.