Archived
1
0
This repository has been archived on 2026-03-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
SomeLab/cs1/C Sharp 1/Program.cs
2025-10-24 17:20:56 +08:00

20 lines
524 B
C#

using System;
using static System.Math;
namespace C_Sharp_1
{
public class Program
{
static void Main(string[] args)
{
double r, c, s, v;
Console.WriteLine("请输入半径:");
r = double.Parse(Console.ReadLine());
c = 2 * PI * r;
s = PI * Pow(r, 2);
v = (4 / 3.0) * PI * Pow(r, 3);
Console.WriteLine("圆周长为{0},面积为{1}",c,s);
Console.WriteLine("球体积为{0}", v);
}
}
}