//1.输入圆柱体的底面半径和高,求体积? Console.Write("请输入圆柱体的半径:"); string r = Console.ReadLine(); Console.Write("请输入圆柱体的高度:"); string h = Console.ReadLine(); int a = Convert.ToInt32(r); double b = Convert.ToDouble(h); const double p = 3.14; Console.WriteLine("圆柱体的体积:V=" + a * a * b * p + "m*3"); //2.建造游泳池,泳池半径a,求泳池护栏长度? Console.Write("请输入游泳池的半径:"); string a = Console.ReadLine(); double r = Convert.ToDouble(a); const double π = 3.14; Console.WriteLine("游泳池护栏的周长:C=" + 2 * π * r + "m"); //3.广场砖面积? const double π = 3.14; Console.Write("请输入游泳池的半径:"); string a = Console.ReadLine(); double r = Convert.ToDouble(a); Console.Write("请输入大广场的半径:"); string b = Console.ReadLine(); double R = Convert.ToDouble(b); Console.WriteLine("广场砖的面积:S=" + (π * R * R - π * r * r) + "m*2"); //4.护栏造价25元/米,广场砖85元/平,求护栏和广场砖共花钱数? Console.Write("请输入游泳池的半径:"); string a = Console.ReadLine(); double r = Convert.ToDouble(a); const double π = 3.14; Console.WriteLine("游泳池护栏的周长:C=" + 2 * π * r + "m"); Console.WriteLine("护栏的花费是:"+25*2*π*r+"元"); Console.Write("请输入大广场的半径:"); string b = Console.ReadLine(); double R = Convert.ToDouble(b); Console.WriteLine("广场砖的面积:S=" + (π * R * R - π * r * r) + "m*2"); Console.WriteLine("广场砖的花费是:" + 85 * (π * R * R - π * r * r) + "元");