Skip to content

Commit

Permalink
Aufgabe 7 Bearbeitet und Benutzerfreundlichkeit geändert
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthur Leon Dyga committed Nov 23, 2022
1 parent 4571cad commit 44cba39
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 4 deletions.
3 changes: 2 additions & 1 deletion 4BMI/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
double Gewicht;
Console.WriteLine("BMI rechner");
double Gewicht;
double größe;
double BMI;

Expand Down
3 changes: 2 additions & 1 deletion 5TreuePrämie/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
double Prämie;
Console.WriteLine("Prämien Rechner");
double Prämie;
Console.WriteLine("Seit wielange arbeiten sie schon?(In jahre)");
double Jahre = Convert.ToDouble(Console.ReadLine());
if (Jahre < 10)
Expand Down
3 changes: 2 additions & 1 deletion 6Sinus/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Console.WriteLine("1 Cosinus");
Console.WriteLine("Rechner");
Console.WriteLine("1 Cosinus");
Console.WriteLine("2 Sinus");
Console.WriteLine("3 Tangens");
Console.WriteLine("Geben sie eine zahl von 1-3 ein.");
Expand Down
11 changes: 11 additions & 0 deletions 7WochenTage/7WochenTage.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>_7WochenTage</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
56 changes: 56 additions & 0 deletions 7WochenTage/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
Console.WriteLine("Wochentag Berechner");
Console.WriteLine();
Console.WriteLine("Jahr");
int Jahr = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Monat");
int m = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Tag");
int q = Convert.ToInt32(Console.ReadLine());
int K = Jahr % 100;
int J = Jahr / 100;
int h;
string Ergebniss = "A";

if (m == 1)
{
m += 13;
}

else if (m == 2)
{
m += 14;
}

h = (q + (((m + 1) * 26) / 10)+K + (K / 4) + (J / 4) - 2 * J);
h %= 7;

if (h < 0)
{
h += 7;
}

switch (h)
{
case 1:
Ergebniss = "Sonntag";
break;
case 2:
Ergebniss = "Montag";
break;
case 3:
Ergebniss = "Dienstag";
break;
case 4:
Ergebniss = "Mittwoch";
break;
case 5:
Ergebniss = "Donnerstag";
break;
case 6:
Ergebniss = "Freitag";
break;
case 7:
Ergebniss = "Samsatag";
break;
}
Console.WriteLine($"Der wochentag lautet: {Ergebniss}");
8 changes: 7 additions & 1 deletion GrundlagenCSharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "4BMI", "4BMI\4BMI.csproj",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "5TreuePrämie", "5TreuePrämie\5TreuePrämie.csproj", "{3469D23E-FCA9-4B20-BC91-6462DF9E03C3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "6Sinus", "6Sinus\6Sinus.csproj", "{24B19179-F743-4474-A5D4-B08D9A7AA5FD}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "6Sinus", "6Sinus\6Sinus.csproj", "{24B19179-F743-4474-A5D4-B08D9A7AA5FD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "7WochenTage", "7WochenTage\7WochenTage.csproj", "{0822DDD4-92F9-4FB0-A595-B18F1DCCA99F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -45,6 +47,10 @@ Global
{24B19179-F743-4474-A5D4-B08D9A7AA5FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{24B19179-F743-4474-A5D4-B08D9A7AA5FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{24B19179-F743-4474-A5D4-B08D9A7AA5FD}.Release|Any CPU.Build.0 = Release|Any CPU
{0822DDD4-92F9-4FB0-A595-B18F1DCCA99F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0822DDD4-92F9-4FB0-A595-B18F1DCCA99F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0822DDD4-92F9-4FB0-A595-B18F1DCCA99F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0822DDD4-92F9-4FB0-A595-B18F1DCCA99F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

0 comments on commit 44cba39

Please sign in to comment.