commit d2b353bdb25d1d6a64724a395ca34722bba225e7 Author: Артем Меинов Date: Sun Jun 26 13:35:01 2022 +0300 add HW1 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..f0b19ec --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,26 @@ +{ + "version": "0.2.0", + "configurations": [ + { + // Use IntelliSense to find out which attributes exist for C# debugging + // Use hover for the description of the existing attributes + // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md + "name": ".NET Core Launch (console)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + // If you have changed target frameworks, make sure to update the program path. + "program": "${workspaceFolder}/bin/Debug/net6.0/programming_GB.dll", + "args": [], + "cwd": "${workspaceFolder}", + // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console + "console": "internalConsole", + "stopAtEntry": false + }, + { + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach" + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..7ff316d --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,41 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/programming_GB.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "publish", + "command": "dotnet", + "type": "process", + "args": [ + "publish", + "${workspaceFolder}/programming_GB.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "watch", + "command": "dotnet", + "type": "process", + "args": [ + "watch", + "run", + "--project", + "${workspaceFolder}/programming_GB.csproj" + ], + "problemMatcher": "$msCompile" + } + ] +} \ No newline at end of file diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..c436f55 --- /dev/null +++ b/Program.cs @@ -0,0 +1,93 @@ + +Main(); + +static void Main(){ + Console.Write("Wich task: "); + int taskNumver = Convert.ToInt32(Console.ReadLine()); + switch (taskNumver) + { + case 1: + First_task(); + break; + case 2: + Second_task(); + break; + + case 3: + Third_task(); + break; + + case 4: + Foth_task(); + break; + + default: + Console.WriteLine("Wrong task"); + break; + } + + +} + +static void First_task() +{ + Console.Write("Input first number: "); + int a = Convert.ToInt32(Console.ReadLine()); + Console.Write("Input second number: "); + int b = Convert.ToInt32(Console.ReadLine()); + + if (a > b) + Console.WriteLine("Max is: " + a); + else + Console.WriteLine("Max is: " + b); +} + +static void Second_task() +{ + int max; + + Console.Write("Input first number: "); + int a = Convert.ToInt32(Console.ReadLine()); + Console.Write("Input second number: "); + int b = Convert.ToInt32(Console.ReadLine()); + Console.Write("Input third number: "); + int c = Convert.ToInt32(Console.ReadLine()); + + /// use standart System.Math + // Console.WriteLine("Max is: " + Math.Max(a, Math.Max(b, c))); + + max = b > a ? b : a; + max = max > c ? max : c; + Console.WriteLine("Max is: " + max); + +} + +static void Third_task() +{ + Console.Write("Input number for check even: "); + int inputNumber = Convert.ToInt32(Console.ReadLine()); + + if (inputNumber%2 == 0) + Console.WriteLine("Even"); + + else + Console.WriteLine("Not even"); + +} + +static void Foth_task() +{ + int current = 1; + Console.Write("Input number: "); + int numberTask4 = Convert.ToInt32(Console.ReadLine()); + + while (current<= numberTask4) + { + if (current%2 == 0) + Console.WriteLine(current); + current++; + } + + +} + diff --git a/bin/Debug/net6.0/programming_GB b/bin/Debug/net6.0/programming_GB new file mode 100755 index 0000000..45b2389 Binary files /dev/null and b/bin/Debug/net6.0/programming_GB differ diff --git a/bin/Debug/net6.0/programming_GB.deps.json b/bin/Debug/net6.0/programming_GB.deps.json new file mode 100644 index 0000000..4d7fc83 --- /dev/null +++ b/bin/Debug/net6.0/programming_GB.deps.json @@ -0,0 +1,23 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v6.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v6.0": { + "programming_GB/1.0.0": { + "runtime": { + "programming_GB.dll": {} + } + } + } + }, + "libraries": { + "programming_GB/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + } + } +} \ No newline at end of file diff --git a/bin/Debug/net6.0/programming_GB.dll b/bin/Debug/net6.0/programming_GB.dll new file mode 100644 index 0000000..c2e25a7 Binary files /dev/null and b/bin/Debug/net6.0/programming_GB.dll differ diff --git a/bin/Debug/net6.0/programming_GB.pdb b/bin/Debug/net6.0/programming_GB.pdb new file mode 100644 index 0000000..38fadc9 Binary files /dev/null and b/bin/Debug/net6.0/programming_GB.pdb differ diff --git a/bin/Debug/net6.0/programming_GB.runtimeconfig.json b/bin/Debug/net6.0/programming_GB.runtimeconfig.json new file mode 100644 index 0000000..4986d16 --- /dev/null +++ b/bin/Debug/net6.0/programming_GB.runtimeconfig.json @@ -0,0 +1,9 @@ +{ + "runtimeOptions": { + "tfm": "net6.0", + "framework": { + "name": "Microsoft.NETCore.App", + "version": "6.0.0" + } + } +} \ No newline at end of file diff --git a/obj/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs b/obj/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs new file mode 100644 index 0000000..f795be5 --- /dev/null +++ b/obj/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = "")] diff --git a/obj/Debug/net6.0/apphost b/obj/Debug/net6.0/apphost new file mode 100755 index 0000000..45b2389 Binary files /dev/null and b/obj/Debug/net6.0/apphost differ diff --git a/obj/Debug/net6.0/programming_GB.AssemblyInfo.cs b/obj/Debug/net6.0/programming_GB.AssemblyInfo.cs new file mode 100644 index 0000000..0654dd7 --- /dev/null +++ b/obj/Debug/net6.0/programming_GB.AssemblyInfo.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("programming_GB")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] +[assembly: System.Reflection.AssemblyProductAttribute("programming_GB")] +[assembly: System.Reflection.AssemblyTitleAttribute("programming_GB")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/obj/Debug/net6.0/programming_GB.AssemblyInfoInputs.cache b/obj/Debug/net6.0/programming_GB.AssemblyInfoInputs.cache new file mode 100644 index 0000000..ffd7b13 --- /dev/null +++ b/obj/Debug/net6.0/programming_GB.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +174df8f480acdedc205cd5308cbfcea8fde245e7 diff --git a/obj/Debug/net6.0/programming_GB.GeneratedMSBuildEditorConfig.editorconfig b/obj/Debug/net6.0/programming_GB.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..42323eb --- /dev/null +++ b/obj/Debug/net6.0/programming_GB.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,10 @@ +is_global = true +build_property.TargetFramework = net6.0 +build_property.TargetPlatformMinVersion = +build_property.UsingMicrosoftNETSdkWeb = +build_property.ProjectTypeGuids = +build_property.InvariantGlobalization = +build_property.PlatformNeutralAssembly = +build_property._SupportedPlatformList = Linux,macOS,Windows +build_property.RootNamespace = programming_GB +build_property.ProjectDir = /Users/artemmeinov/Documents/GeekBrains_kurse/programming_GB/ diff --git a/obj/Debug/net6.0/programming_GB.GlobalUsings.g.cs b/obj/Debug/net6.0/programming_GB.GlobalUsings.g.cs new file mode 100644 index 0000000..8578f3d --- /dev/null +++ b/obj/Debug/net6.0/programming_GB.GlobalUsings.g.cs @@ -0,0 +1,8 @@ +// +global using global::System; +global using global::System.Collections.Generic; +global using global::System.IO; +global using global::System.Linq; +global using global::System.Net.Http; +global using global::System.Threading; +global using global::System.Threading.Tasks; diff --git a/obj/Debug/net6.0/programming_GB.assets.cache b/obj/Debug/net6.0/programming_GB.assets.cache new file mode 100644 index 0000000..7349a18 Binary files /dev/null and b/obj/Debug/net6.0/programming_GB.assets.cache differ diff --git a/obj/Debug/net6.0/programming_GB.csproj.AssemblyReference.cache b/obj/Debug/net6.0/programming_GB.csproj.AssemblyReference.cache new file mode 100644 index 0000000..df42860 Binary files /dev/null and b/obj/Debug/net6.0/programming_GB.csproj.AssemblyReference.cache differ diff --git a/obj/Debug/net6.0/programming_GB.csproj.CoreCompileInputs.cache b/obj/Debug/net6.0/programming_GB.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..b9f9ca1 --- /dev/null +++ b/obj/Debug/net6.0/programming_GB.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +4726f62c8aecdfb151956f90c7e130fcb5d3f1d4 diff --git a/obj/Debug/net6.0/programming_GB.csproj.FileListAbsolute.txt b/obj/Debug/net6.0/programming_GB.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..11a5510 --- /dev/null +++ b/obj/Debug/net6.0/programming_GB.csproj.FileListAbsolute.txt @@ -0,0 +1,15 @@ +/Users/artemmeinov/Documents/GeekBrains_kurse/programming_GB/bin/Debug/net6.0/programming_GB +/Users/artemmeinov/Documents/GeekBrains_kurse/programming_GB/bin/Debug/net6.0/programming_GB.deps.json +/Users/artemmeinov/Documents/GeekBrains_kurse/programming_GB/bin/Debug/net6.0/programming_GB.runtimeconfig.json +/Users/artemmeinov/Documents/GeekBrains_kurse/programming_GB/bin/Debug/net6.0/programming_GB.dll +/Users/artemmeinov/Documents/GeekBrains_kurse/programming_GB/bin/Debug/net6.0/programming_GB.pdb +/Users/artemmeinov/Documents/GeekBrains_kurse/programming_GB/obj/Debug/net6.0/programming_GB.csproj.AssemblyReference.cache +/Users/artemmeinov/Documents/GeekBrains_kurse/programming_GB/obj/Debug/net6.0/programming_GB.GeneratedMSBuildEditorConfig.editorconfig +/Users/artemmeinov/Documents/GeekBrains_kurse/programming_GB/obj/Debug/net6.0/programming_GB.AssemblyInfoInputs.cache +/Users/artemmeinov/Documents/GeekBrains_kurse/programming_GB/obj/Debug/net6.0/programming_GB.AssemblyInfo.cs +/Users/artemmeinov/Documents/GeekBrains_kurse/programming_GB/obj/Debug/net6.0/programming_GB.csproj.CoreCompileInputs.cache +/Users/artemmeinov/Documents/GeekBrains_kurse/programming_GB/obj/Debug/net6.0/programming_GB.dll +/Users/artemmeinov/Documents/GeekBrains_kurse/programming_GB/obj/Debug/net6.0/refint/programming_GB.dll +/Users/artemmeinov/Documents/GeekBrains_kurse/programming_GB/obj/Debug/net6.0/programming_GB.pdb +/Users/artemmeinov/Documents/GeekBrains_kurse/programming_GB/obj/Debug/net6.0/programming_GB.genruntimeconfig.cache +/Users/artemmeinov/Documents/GeekBrains_kurse/programming_GB/obj/Debug/net6.0/ref/programming_GB.dll diff --git a/obj/Debug/net6.0/programming_GB.dll b/obj/Debug/net6.0/programming_GB.dll new file mode 100644 index 0000000..c2e25a7 Binary files /dev/null and b/obj/Debug/net6.0/programming_GB.dll differ diff --git a/obj/Debug/net6.0/programming_GB.genruntimeconfig.cache b/obj/Debug/net6.0/programming_GB.genruntimeconfig.cache new file mode 100644 index 0000000..654f26b --- /dev/null +++ b/obj/Debug/net6.0/programming_GB.genruntimeconfig.cache @@ -0,0 +1 @@ +9508dfd8f3a9fbc2694fcd2a24539257237475ce diff --git a/obj/Debug/net6.0/programming_GB.pdb b/obj/Debug/net6.0/programming_GB.pdb new file mode 100644 index 0000000..38fadc9 Binary files /dev/null and b/obj/Debug/net6.0/programming_GB.pdb differ diff --git a/obj/Debug/net6.0/ref/programming_GB.dll b/obj/Debug/net6.0/ref/programming_GB.dll new file mode 100644 index 0000000..7bbe20c Binary files /dev/null and b/obj/Debug/net6.0/ref/programming_GB.dll differ diff --git a/obj/Debug/net6.0/refint/programming_GB.dll b/obj/Debug/net6.0/refint/programming_GB.dll new file mode 100644 index 0000000..7bbe20c Binary files /dev/null and b/obj/Debug/net6.0/refint/programming_GB.dll differ diff --git a/obj/programming_GB.csproj.nuget.dgspec.json b/obj/programming_GB.csproj.nuget.dgspec.json new file mode 100644 index 0000000..bf5d633 --- /dev/null +++ b/obj/programming_GB.csproj.nuget.dgspec.json @@ -0,0 +1,60 @@ +{ + "format": 1, + "restore": { + "/Users/artemmeinov/Documents/GeekBrains_kurse/programming_GB/programming_GB.csproj": {} + }, + "projects": { + "/Users/artemmeinov/Documents/GeekBrains_kurse/programming_GB/programming_GB.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "/Users/artemmeinov/Documents/GeekBrains_kurse/programming_GB/programming_GB.csproj", + "projectName": "programming_GB", + "projectPath": "/Users/artemmeinov/Documents/GeekBrains_kurse/programming_GB/programming_GB.csproj", + "packagesPath": "/Users/artemmeinov/.nuget/packages/", + "outputPath": "/Users/artemmeinov/Documents/GeekBrains_kurse/programming_GB/obj/", + "projectStyle": "PackageReference", + "configFilePaths": [ + "/Users/artemmeinov/.nuget/NuGet/NuGet.Config" + ], + "originalTargetFrameworks": [ + "net6.0" + ], + "sources": { + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/6.0.301/RuntimeIdentifierGraph.json" + } + } + } + } +} \ No newline at end of file diff --git a/obj/programming_GB.csproj.nuget.g.props b/obj/programming_GB.csproj.nuget.g.props new file mode 100644 index 0000000..5cd5e71 --- /dev/null +++ b/obj/programming_GB.csproj.nuget.g.props @@ -0,0 +1,15 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + /Users/artemmeinov/.nuget/packages/ + /Users/artemmeinov/.nuget/packages/ + PackageReference + 6.2.1 + + + + + \ No newline at end of file diff --git a/obj/programming_GB.csproj.nuget.g.targets b/obj/programming_GB.csproj.nuget.g.targets new file mode 100644 index 0000000..3dc06ef --- /dev/null +++ b/obj/programming_GB.csproj.nuget.g.targets @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/obj/project.assets.json b/obj/project.assets.json new file mode 100644 index 0000000..27eabfd --- /dev/null +++ b/obj/project.assets.json @@ -0,0 +1,65 @@ +{ + "version": 3, + "targets": { + "net6.0": {} + }, + "libraries": {}, + "projectFileDependencyGroups": { + "net6.0": [] + }, + "packageFolders": { + "/Users/artemmeinov/.nuget/packages/": {} + }, + "project": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "/Users/artemmeinov/Documents/GeekBrains_kurse/programming_GB/programming_GB.csproj", + "projectName": "programming_GB", + "projectPath": "/Users/artemmeinov/Documents/GeekBrains_kurse/programming_GB/programming_GB.csproj", + "packagesPath": "/Users/artemmeinov/.nuget/packages/", + "outputPath": "/Users/artemmeinov/Documents/GeekBrains_kurse/programming_GB/obj/", + "projectStyle": "PackageReference", + "configFilePaths": [ + "/Users/artemmeinov/.nuget/NuGet/NuGet.Config" + ], + "originalTargetFrameworks": [ + "net6.0" + ], + "sources": { + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/6.0.301/RuntimeIdentifierGraph.json" + } + } + } +} \ No newline at end of file diff --git a/obj/project.nuget.cache b/obj/project.nuget.cache new file mode 100644 index 0000000..6a5f748 --- /dev/null +++ b/obj/project.nuget.cache @@ -0,0 +1,8 @@ +{ + "version": 2, + "dgSpecHash": "2k1tXVGB5fPgp7tciKBGSn3/igRcCul0z6rtTySFFkQMqGvZg/woPB3EhuZu0RH7yQLW/dH1pm78H6UDIj7hIQ==", + "success": true, + "projectFilePath": "/Users/artemmeinov/Documents/GeekBrains_kurse/programming_GB/programming_GB.csproj", + "expectedPackageFiles": [], + "logs": [] +} \ No newline at end of file diff --git a/programming_GB.csproj b/programming_GB.csproj new file mode 100644 index 0000000..40c60dd --- /dev/null +++ b/programming_GB.csproj @@ -0,0 +1,10 @@ + + + + Exe + net6.0 + enable + enable + + +