Test
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
namespace aufgaben;
|
||||
namespace aufgaben_tag1;
|
||||
|
||||
internal class Aufgabe_1
|
||||
{
|
||||
@@ -35,7 +35,7 @@ internal class Aufgabe_3
|
||||
var max = bound;
|
||||
|
||||
var rnd = new Random();
|
||||
var randomNumber = rnd.Next(min, bound+1);
|
||||
var randomNumber = rnd.Next(min, bound);
|
||||
var guess = -1;
|
||||
|
||||
var tries = 0;
|
||||
@@ -61,13 +61,13 @@ internal class Aufgabe_3
|
||||
|
||||
if (guess > randomNumber) {
|
||||
if (guess < max)
|
||||
max = guess;
|
||||
max = guess - 1;
|
||||
Console.WriteLine("Die gesuchte Zahl ist kleiner.");
|
||||
}
|
||||
|
||||
if (guess < randomNumber) {
|
||||
if (guess > min)
|
||||
min = guess;
|
||||
min = guess + 1;
|
||||
Console.WriteLine("Die gesuchte Zahl ist größer.");
|
||||
}
|
||||
|
||||
@@ -76,3 +76,20 @@ internal class Aufgabe_3
|
||||
Console.WriteLine("Benötigte Versuche: " + tries);
|
||||
}
|
||||
}
|
||||
|
||||
internal class Aufgabe_4
|
||||
{
|
||||
public static string berechneArtikelnummer(int nummer)
|
||||
{
|
||||
var temp = nummer;
|
||||
|
||||
var pruefziffer = 0;
|
||||
for (var i = 0; i < 5; i++)
|
||||
{
|
||||
var isEven = temp%2 == 0;
|
||||
pruefziffer += isEven ? temp%10 : ((temp%10) * 3);
|
||||
temp /= 10;
|
||||
}
|
||||
return (nummer + "-" + (pruefziffer%10));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace aufgaben;
|
||||
namespace aufgaben_tag1;
|
||||
|
||||
|
||||
internal class Program
|
||||
@@ -26,5 +26,7 @@ internal class Program
|
||||
Console.WriteLine("Die Quersumme von " + zahl + " ist " + quersumme);
|
||||
|
||||
Aufgabe_3.zahlenRaten(bound);
|
||||
|
||||
Console.WriteLine(Aufgabe_4.berechneArtikelnummer(27493));
|
||||
}
|
||||
}
|
||||
|
||||
Executable
BIN
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v10.0",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v10.0": {
|
||||
"Aufgaben/1.0.0": {
|
||||
"runtime": {
|
||||
"Aufgaben.dll": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"Aufgaben/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"runtimeOptions": {
|
||||
"tfm": "net10.0",
|
||||
"framework": {
|
||||
"name": "Microsoft.NETCore.App",
|
||||
"version": "10.0.0"
|
||||
},
|
||||
"configProperties": {
|
||||
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +1,26 @@
|
||||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"/home/max/Dokumente/Umschulung/CSharp/Tag 1/Aufgaben/Aufgaben.csproj": {}
|
||||
"/home/wbs/Dokumente/Programmierung/wbs-csharp/Tag 1/Aufgaben/Aufgaben.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"/home/max/Dokumente/Umschulung/CSharp/Tag 1/Aufgaben/Aufgaben.csproj": {
|
||||
"/home/wbs/Dokumente/Programmierung/wbs-csharp/Tag 1/Aufgaben/Aufgaben.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "/home/max/Dokumente/Umschulung/CSharp/Tag 1/Aufgaben/Aufgaben.csproj",
|
||||
"projectUniqueName": "/home/wbs/Dokumente/Programmierung/wbs-csharp/Tag 1/Aufgaben/Aufgaben.csproj",
|
||||
"projectName": "Aufgaben",
|
||||
"projectPath": "/home/max/Dokumente/Umschulung/CSharp/Tag 1/Aufgaben/Aufgaben.csproj",
|
||||
"packagesPath": "/home/max/.nuget/packages/",
|
||||
"outputPath": "/home/max/Dokumente/Umschulung/CSharp/Tag 1/Aufgaben/obj/",
|
||||
"projectPath": "/home/wbs/Dokumente/Programmierung/wbs-csharp/Tag 1/Aufgaben/Aufgaben.csproj",
|
||||
"packagesPath": "/home/wbs/.nuget/packages/",
|
||||
"outputPath": "/home/wbs/Dokumente/Programmierung/wbs-csharp/Tag 1/Aufgaben/obj/",
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"/home/max/.nuget/NuGet/NuGet.Config"
|
||||
"/home/wbs/.nuget/NuGet/NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"net10.0"
|
||||
],
|
||||
"sources": {
|
||||
"/usr/lib64/dotnet/library-packs": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
@@ -59,7 +60,7 @@
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/10.0.110/PortableRuntimeIdentifierGraph.json",
|
||||
"runtimeIdentifierGraphPath": "/usr/lib64/dotnet/sdk/10.0.109/PortableRuntimeIdentifierGraph.json",
|
||||
"packagesToPrune": {
|
||||
"Microsoft.CSharp": "(,4.7.32767]",
|
||||
"Microsoft.VisualBasic": "(,10.4.32767]",
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
|
||||
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
|
||||
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
|
||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/max/.nuget/packages/</NuGetPackageRoot>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/max/.nuget/packages/</NuGetPackageFolders>
|
||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/wbs/.nuget/packages/</NuGetPackageRoot>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/wbs/.nuget/packages/</NuGetPackageFolders>
|
||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">7.0.0</NuGetToolVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<SourceRoot Include="/home/max/.nuget/packages/" />
|
||||
<SourceRoot Include="/home/wbs/.nuget/packages/" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -13,7 +13,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Aufgaben")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+82b48974c5a5b7c061261157a2cdf31b7722d5bc")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Aufgaben")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Aufgaben")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
44fb4c4abecfa0b87e13313566f42cebb12ed6900820c0c8cc745eca85dcb894
|
||||
e58751dbd26610a34a3c549df496fc7d3f7847282b41d171ffbccb58796b0c08
|
||||
|
||||
@@ -10,7 +10,7 @@ build_property.PlatformNeutralAssembly =
|
||||
build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = Aufgaben
|
||||
build_property.ProjectDir = /home/max/Dokumente/Umschulung/CSharp/Tag 1/Aufgaben/
|
||||
build_property.ProjectDir = /home/wbs/Dokumente/Programmierung/wbs-csharp/Tag 1/Aufgaben/
|
||||
build_property.EnableComHosting =
|
||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||
build_property.EffectiveAnalysisLevelStyle = 10.0
|
||||
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
f08a11ed8fe54efa818156639f83aaeb606ebb0b5ae14405ece8d83caac67065
|
||||
44ad510643be1f62012852e0f025c34bf376a4e90fb122fb2f5768455eb1c6da
|
||||
|
||||
@@ -12,3 +12,17 @@
|
||||
/home/max/Dokumente/Umschulung/CSharp/Tag 1/Aufgaben/obj/Debug/net10.0/Aufgaben.pdb
|
||||
/home/max/Dokumente/Umschulung/CSharp/Tag 1/Aufgaben/obj/Debug/net10.0/Aufgaben.genruntimeconfig.cache
|
||||
/home/max/Dokumente/Umschulung/CSharp/Tag 1/Aufgaben/obj/Debug/net10.0/ref/Aufgaben.dll
|
||||
/home/wbs/Dokumente/Programmierung/wbs-csharp/Tag 1/Aufgaben/bin/Debug/net10.0/Aufgaben
|
||||
/home/wbs/Dokumente/Programmierung/wbs-csharp/Tag 1/Aufgaben/bin/Debug/net10.0/Aufgaben.deps.json
|
||||
/home/wbs/Dokumente/Programmierung/wbs-csharp/Tag 1/Aufgaben/bin/Debug/net10.0/Aufgaben.runtimeconfig.json
|
||||
/home/wbs/Dokumente/Programmierung/wbs-csharp/Tag 1/Aufgaben/bin/Debug/net10.0/Aufgaben.dll
|
||||
/home/wbs/Dokumente/Programmierung/wbs-csharp/Tag 1/Aufgaben/bin/Debug/net10.0/Aufgaben.pdb
|
||||
/home/wbs/Dokumente/Programmierung/wbs-csharp/Tag 1/Aufgaben/obj/Debug/net10.0/Aufgaben.GeneratedMSBuildEditorConfig.editorconfig
|
||||
/home/wbs/Dokumente/Programmierung/wbs-csharp/Tag 1/Aufgaben/obj/Debug/net10.0/Aufgaben.AssemblyInfoInputs.cache
|
||||
/home/wbs/Dokumente/Programmierung/wbs-csharp/Tag 1/Aufgaben/obj/Debug/net10.0/Aufgaben.AssemblyInfo.cs
|
||||
/home/wbs/Dokumente/Programmierung/wbs-csharp/Tag 1/Aufgaben/obj/Debug/net10.0/Aufgaben.csproj.CoreCompileInputs.cache
|
||||
/home/wbs/Dokumente/Programmierung/wbs-csharp/Tag 1/Aufgaben/obj/Debug/net10.0/Aufgaben.dll
|
||||
/home/wbs/Dokumente/Programmierung/wbs-csharp/Tag 1/Aufgaben/obj/Debug/net10.0/refint/Aufgaben.dll
|
||||
/home/wbs/Dokumente/Programmierung/wbs-csharp/Tag 1/Aufgaben/obj/Debug/net10.0/Aufgaben.pdb
|
||||
/home/wbs/Dokumente/Programmierung/wbs-csharp/Tag 1/Aufgaben/obj/Debug/net10.0/Aufgaben.genruntimeconfig.cache
|
||||
/home/wbs/Dokumente/Programmierung/wbs-csharp/Tag 1/Aufgaben/obj/Debug/net10.0/ref/Aufgaben.dll
|
||||
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
4447ffcdb71f36d5430c2e4ba0ad35f48061e68d732f1eb333f7885b8e738b3b
|
||||
1ec70e398c94e23143a9e273d92b53c650573cbf7772fc9e74b4bee9971fd5a9
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -8,24 +8,25 @@
|
||||
"net10.0": []
|
||||
},
|
||||
"packageFolders": {
|
||||
"/home/max/.nuget/packages/": {}
|
||||
"/home/wbs/.nuget/packages/": {}
|
||||
},
|
||||
"project": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "/home/max/Dokumente/Umschulung/CSharp/Tag 1/Aufgaben/Aufgaben.csproj",
|
||||
"projectUniqueName": "/home/wbs/Dokumente/Programmierung/wbs-csharp/Tag 1/Aufgaben/Aufgaben.csproj",
|
||||
"projectName": "Aufgaben",
|
||||
"projectPath": "/home/max/Dokumente/Umschulung/CSharp/Tag 1/Aufgaben/Aufgaben.csproj",
|
||||
"packagesPath": "/home/max/.nuget/packages/",
|
||||
"outputPath": "/home/max/Dokumente/Umschulung/CSharp/Tag 1/Aufgaben/obj/",
|
||||
"projectPath": "/home/wbs/Dokumente/Programmierung/wbs-csharp/Tag 1/Aufgaben/Aufgaben.csproj",
|
||||
"packagesPath": "/home/wbs/.nuget/packages/",
|
||||
"outputPath": "/home/wbs/Dokumente/Programmierung/wbs-csharp/Tag 1/Aufgaben/obj/",
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"/home/max/.nuget/NuGet/NuGet.Config"
|
||||
"/home/wbs/.nuget/NuGet/NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"net10.0"
|
||||
],
|
||||
"sources": {
|
||||
"/usr/lib64/dotnet/library-packs": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
@@ -65,7 +66,7 @@
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/10.0.110/PortableRuntimeIdentifierGraph.json",
|
||||
"runtimeIdentifierGraphPath": "/usr/lib64/dotnet/sdk/10.0.109/PortableRuntimeIdentifierGraph.json",
|
||||
"packagesToPrune": {
|
||||
"Microsoft.CSharp": "(,4.7.32767]",
|
||||
"Microsoft.VisualBasic": "(,10.4.32767]",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "VpzgKffLVSM=",
|
||||
"dgSpecHash": "WhrpAzMGDTY=",
|
||||
"success": true,
|
||||
"projectFilePath": "/home/max/Dokumente/Umschulung/CSharp/Tag 1/Aufgaben/Aufgaben.csproj",
|
||||
"projectFilePath": "/home/wbs/Dokumente/Programmierung/wbs-csharp/Tag 1/Aufgaben/Aufgaben.csproj",
|
||||
"expectedPackageFiles": [],
|
||||
"logs": []
|
||||
}
|
||||
Reference in New Issue
Block a user