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