Initial commit
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@@ -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_3_4", "C_Sharp_3_4.csproj", "{6EC9575D-0EE8-4FEA-AD71-E573233BEEF4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{6EC9575D-0EE8-4FEA-AD71-E573233BEEF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6EC9575D-0EE8-4FEA-AD71-E573233BEEF4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6EC9575D-0EE8-4FEA-AD71-E573233BEEF4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6EC9575D-0EE8-4FEA-AD71-E573233BEEF4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {8E01B379-AB7D-4A69-8843-55F63765792C}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
namespace C_Sharp_3_4
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
double n = 1, t = 1, pi = 0, s = 1;
|
||||
while (Math.Abs(t) >= Math.Pow(10,-6))
|
||||
{
|
||||
pi += t;
|
||||
n += 2;
|
||||
s = -s;
|
||||
t = s / n;
|
||||
}
|
||||
pi *= 4;
|
||||
Console.WriteLine("pi={0}" ,pi);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user