C language · To calculate the surface area of a circle

Source: Internet
Author: User

The algorithm increases 3-3 to calculate the surface area volume time limit: 1.0s memory limit: 256.0MBThe problem description accepts the user output value, outputs the radius of the (1) Circle area, (2) The Sphere surface area, (3) the sphere volume. Pi value 3.1415926536, the result retains 10 decimal places, each column occupies 20 characters, left-justified. Sample input An input example that satisfies the requirements of the topic.
Cases:
The output of the 1 sample output corresponds to the example input above.
Example: (The first line 1 is the input, the second line is the output)
Data size and convention all results are within the range of a double type.
1#include <stdio.h>2 #definePi 3.14159265363 intMain () {4     DoubleR;5scanf"%LF",&R);6printf"%.10f\t", pi*r*R);7printf"%.10f\t",4*pi*r*R);8printf"%.10f",4*pi*r*r*r/3);9}

C language · To calculate the surface area of a circle

Related Article

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.