mirror of
https://github.com/svek95/programming_GB.git
synced 2026-05-17 18:41:44 +03:00
add HW1
This commit is contained in:
Vendored
+26
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
+41
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
+93
@@ -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++;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Executable
BIN
Binary file not shown.
@@ -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": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"runtimeOptions": {
|
||||
"tfm": "net6.0",
|
||||
"framework": {
|
||||
"name": "Microsoft.NETCore.App",
|
||||
"version": "6.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = "")]
|
||||
Executable
BIN
Binary file not shown.
@@ -0,0 +1,22 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
174df8f480acdedc205cd5308cbfcea8fde245e7
|
||||
@@ -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/
|
||||
@@ -0,0 +1,8 @@
|
||||
// <auto-generated/>
|
||||
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;
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
4726f62c8aecdfb151956f90c7e130fcb5d3f1d4
|
||||
@@ -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
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
9508dfd8f3a9fbc2694fcd2a24539257237475ce
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
|
||||
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
|
||||
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
|
||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/Users/artemmeinov/.nuget/packages/</NuGetPackageRoot>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/Users/artemmeinov/.nuget/packages/</NuGetPackageFolders>
|
||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.2.1</NuGetToolVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<SourceRoot Include="/Users/artemmeinov/.nuget/packages/" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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": []
|
||||
}
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user