Rwkj 1287 ball volume

Source: Internet
Author: User

C language: Sequence Structure 3 (ball volume)
Time limit (Common/Java): 1000 ms/3000 Ms running memory limit: 65536 Kbyte
Total submissions: 880 pass the test: 610

Description


Write a program, input the ball to the radius, calculate and output the volume of the ball. The circumference rate is 3.14159.


Input

Ball to radius.

Output

The volume of the ball. Note: Keep the three decimal places and wrap the lines after the output.

Sample Input

10

Sample output

4188.787

 

 


# Include <stdio. h>
# Define PI 3.14159
Void main ()
{
Int R;
Float X;
Scanf ("% d", & R );
X = (4./3) * pI * r * R;
Printf ("%. 3f", X );
}

 


# Include <stdio. h>
Int main ()
{Double R, V;
Scanf ("% lf", & R );
V = 3.14159*4/3 * r * R;
Printf ("%. 3lf \ n", V );
Return 0;
}

 

 


# Include <stdio. h>
# Define PI 3.14159
Int main ()
{
Double R, V;
Scanf ("% d", & R );
V = (4./3) * pI * r * R;
Printf ("%. 3f", V );
}

 

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.