Archived
1
0
This commit is contained in:
2025-10-24 17:20:56 +08:00
parent acc0c9e220
commit e0fbc20716
21 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.14.36616.10 d17.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C Sharp 1_1", "C Sharp 1_1.csproj", "{C2EC9237-9D92-490E-8A85-9727DF433991}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C2EC9237-9D92-490E-8A85-9727DF433991}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C2EC9237-9D92-490E-8A85-9727DF433991}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C2EC9237-9D92-490E-8A85-9727DF433991}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C2EC9237-9D92-490E-8A85-9727DF433991}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CE7B74FA-2C51-4DEE-97D7-7D0DB5455A3C}
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>C_Sharp_1</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

19
cs1/C Sharp 1/Program.cs Normal file
View File

@@ -0,0 +1,19 @@
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);
}
}
}