统一归档20260319
This commit is contained in:
11
CS/lab10/10_1/10_1.csproj
Normal file
11
CS/lab10/10_1/10_1.csproj
Normal file
@@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<RootNamespace>_10_1</RootNamespace>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
25
CS/lab10/10_1/10_1.sln
Normal file
25
CS/lab10/10_1/10_1.sln
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.14.36717.8 d17.14
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "10_1", "10_1.csproj", "{AF3EAA9E-B0A4-4DDD-AD76-29F65FF546CC}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{AF3EAA9E-B0A4-4DDD-AD76-29F65FF546CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AF3EAA9E-B0A4-4DDD-AD76-29F65FF546CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AF3EAA9E-B0A4-4DDD-AD76-29F65FF546CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AF3EAA9E-B0A4-4DDD-AD76-29F65FF546CC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {AE8A4792-903F-4B80-862F-2D95B7DEE3B6}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
25
CS/lab10/10_1/Program.cs
Normal file
25
CS/lab10/10_1/Program.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
namespace _10_1
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
double a, b, c, p, h, area;
|
||||
Console.WriteLine("输入三角形的直角边A:");
|
||||
a = Convert.ToDouble(Console.ReadLine());
|
||||
Console.WriteLine("输入三角形的直角边B:");
|
||||
b = Convert.ToDouble(Console.ReadLine());
|
||||
c = Math.Sqrt(a * a + b * b);
|
||||
Console.WriteLine("直角三角形的三边分别为,a={0},b={1},c={2}");
|
||||
p = a + b + c;
|
||||
h = p / 2;
|
||||
area = Math.Sqrt(h * (h - a) * (h - b) * (h - c));
|
||||
Console.WriteLine("直角三角形的周长为{0},面积为:{1}", p, area);
|
||||
double sinA= a / c;
|
||||
double aAngel= Math.Asin(sinA) * 180 / Math.PI;
|
||||
double cosB= a / c;
|
||||
double bAngel= Math.Acos(cosB) * 180 / Math.PI;
|
||||
Console.WriteLine("直角三角形的角A为{0},角B为:{1}", aAngel, bAngel);
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
CS/lab10/10_1/屏幕截图 2025-11-28 162117.png
Normal file
BIN
CS/lab10/10_1/屏幕截图 2025-11-28 162117.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 72 KiB |
Reference in New Issue
Block a user