40 lines
843 B
C#
40 lines
843 B
C#
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;
|
|
}
|
|
}
|
|
} |