diff --git a/01 Pythagoras/01 Pythagoras.csproj b/01 Pythagoras/01 Pythagoras.csproj new file mode 100644 index 0000000000000000000000000000000000000000..676a965f38701207f718549e0844237e40aa61f8 --- /dev/null +++ b/01 Pythagoras/01 Pythagoras.csproj @@ -0,0 +1,9 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>netcoreapp3.1</TargetFramework> + <RootNamespace>_01_Pythagoras</RootNamespace> + </PropertyGroup> + +</Project> diff --git a/01 Pythagoras/Program.cs b/01 Pythagoras/Program.cs new file mode 100644 index 0000000000000000000000000000000000000000..b4fb882f4dedb02a7ca5bf60c7125ff07fc33f13 --- /dev/null +++ b/01 Pythagoras/Program.cs @@ -0,0 +1,21 @@ +using System; + +namespace _01_Pythagoras +{ + class Program + { + static void Main(string[] args) + { + double a, b, c; + Console.WriteLine("Pythagoras"); + + Console.Write("Länge der Seite a: "); + a = Convert.ToDouble(Console.ReadLine()); + + Console.Write("Länge der Seite b: "); + b = Convert.ToDouble(Console.ReadLine()); + + Console.WriteLine($"Länge der Seite c: {Math.Sqrt(a * a + b * b)}"); + } + } +} diff --git a/Prog1_WS2021_22.sln b/Prog1_WS2021_22.sln index 4ce1a047905609324fc2e80b03c5ea27e7b34747..996e363d0959f172cc8f1f8e9d041d2e671a91ce 100644 --- a/Prog1_WS2021_22.sln +++ b/Prog1_WS2021_22.sln @@ -3,7 +3,19 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.31702.278 MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "01 Pythagoras", "01 Pythagoras\01 Pythagoras.csproj", "{8DC7B6AA-65FE-46EA-B91C-245660F723E8}" +EndProject Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8DC7B6AA-65FE-46EA-B91C-245660F723E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8DC7B6AA-65FE-46EA-B91C-245660F723E8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8DC7B6AA-65FE-46EA-B91C-245660F723E8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8DC7B6AA-65FE-46EA-B91C-245660F723E8}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection