//球体表面积A=4π*R^2,体积V=4/3π*R^3
Console.WriteLine("请输入圆的半径R");
double R=Convert.ToInt32(Console.ReadLine());
double round = 4 * Math.PI * R * R;
double volume = 4 * Math.PI * R * R * R / 3;
Console.WriteLine("圆的的表面积是{0};圆的体积是{1}",round,volume);
//圆锥表面积A=1/2*s*L+π*R^2,体积V=1/3*S*H=1/3π*R^2*H
Console.WriteLine("请输入圆锥的底面圆半径R");
double R1 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("请输入圆锥母线长s");
double s = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("请输入圆锥的底面周长L");
double l = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("请输入圆锥高H");
double H = Convert.ToInt32(Console.ReadLine());
double round1 = 0.5*s*l+Math.PI*R1*R1;
double volume1 = Math.PI*R1*R1*H/3;
Console.WriteLine("圆的的表面积是{0};圆的体积是{1}", round1, volume1);
//圆柱表面积A=L*H+2*S=2π*R*H+2π*R^2,体积V=S*H=π*R^2*H
//(L--底面周长,H--柱高,S--底面面积,R--底面圆半径)
Console.WriteLine("请输入H--柱高");
double H2 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("请输入R--底面圆半径");
double R2 = Convert.ToInt32(Console.ReadLine());
double A = 2 * Math.PI * R2 * H2 + 2 * Math.PI * R2 * R2;
double V = Math.PI * R2 * R2 * H2;
Console.WriteLine("圆柱表面积A{0},圆柱表面积V{1}",A,V);
Console.ReadKey();