add Programmyday form github
This commit is contained in:
10
programmday/MethodenWahnsinn.csproj
Normal file
10
programmday/MethodenWahnsinn.csproj
Normal file
@@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
40
programmday/Program.cs
Normal file
40
programmday/Program.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace MethodenWahnsinn
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
int x = 42;
|
||||
int y = Methode1(x);
|
||||
Console.WriteLine($"{x+y}");
|
||||
}
|
||||
static int Methode1(int x)
|
||||
{
|
||||
x += 1;
|
||||
int y = Methode2(x);
|
||||
int z = x + y;
|
||||
return z;
|
||||
}
|
||||
static int Methode2(int x)
|
||||
{
|
||||
x += 2;
|
||||
int y = Methode3(x);
|
||||
int z = x + y;
|
||||
return z;
|
||||
}
|
||||
static int Methode3(int x)
|
||||
{
|
||||
x += 3;
|
||||
int y = Methode4(x);
|
||||
int z = x + y;
|
||||
return z;
|
||||
}
|
||||
static int Methode4(int x)
|
||||
{
|
||||
x += 4;
|
||||
return x;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user