diff --git a/ProgramFirstLesson/.vs/ProgramFirstLesson/v16/.suo b/ProgramFirstLesson/.vs/ProgramFirstLesson/v16/.suo new file mode 100644 index 0000000..1acc3a5 Binary files /dev/null and b/ProgramFirstLesson/.vs/ProgramFirstLesson/v16/.suo differ diff --git a/ProgramFirstLesson/Hm1Lesson1/App.config b/ProgramFirstLesson/Hm1Lesson1/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgramFirstLesson/Hm1Lesson1/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgramFirstLesson/Hm1Lesson1/Form1.Designer.cs b/ProgramFirstLesson/Hm1Lesson1/Form1.Designer.cs new file mode 100644 index 0000000..ec7ce7a --- /dev/null +++ b/ProgramFirstLesson/Hm1Lesson1/Form1.Designer.cs @@ -0,0 +1,40 @@ +namespace Hm1Lesson1 +{ + partial class Form1 + { + /// + /// Обязательная переменная конструктора. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Освободить все используемые ресурсы. + /// + /// истинно, если управляемый ресурс должен быть удален; иначе ложно. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Код, автоматически созданный конструктором форм Windows + + /// + /// Требуемый метод для поддержки конструктора — не изменяйте + /// содержимое этого метода с помощью редактора кода. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Text = "Form1"; + } + + #endregion + } +} + diff --git a/ProgramFirstLesson/Hm1Lesson1/Form1.cs b/ProgramFirstLesson/Hm1Lesson1/Form1.cs new file mode 100644 index 0000000..a106844 --- /dev/null +++ b/ProgramFirstLesson/Hm1Lesson1/Form1.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Hm1Lesson1 +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + } +} diff --git a/ProgramFirstLesson/Hm1Lesson1/Hm1Lesson1.csproj b/ProgramFirstLesson/Hm1Lesson1/Hm1Lesson1.csproj new file mode 100644 index 0000000..94b145f --- /dev/null +++ b/ProgramFirstLesson/Hm1Lesson1/Hm1Lesson1.csproj @@ -0,0 +1,80 @@ + + + + + Debug + AnyCPU + {D31CED92-B630-464D-8C30-390F7CE9DFC2} + WinExe + Hm1Lesson1 + Hm1Lesson1 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + \ No newline at end of file diff --git a/ProgramFirstLesson/Hm1Lesson1/Program.cs b/ProgramFirstLesson/Hm1Lesson1/Program.cs new file mode 100644 index 0000000..55a9bab --- /dev/null +++ b/ProgramFirstLesson/Hm1Lesson1/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Hm1Lesson1 +{ + static class Program + { + /// + /// Главная точка входа для приложения. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/ProgramFirstLesson/Hm1Lesson1/Properties/AssemblyInfo.cs b/ProgramFirstLesson/Hm1Lesson1/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..0571e7b --- /dev/null +++ b/ProgramFirstLesson/Hm1Lesson1/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанных со сборкой. +[assembly: AssemblyTitle("Hm1Lesson1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Hm1Lesson1")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// COM, следует установить атрибут ComVisible в TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("d31ced92-b630-464d-8c30-390f7ce9dfc2")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgramFirstLesson/Hm1Lesson1/Properties/Resources.Designer.cs b/ProgramFirstLesson/Hm1Lesson1/Properties/Resources.Designer.cs new file mode 100644 index 0000000..b8455bf --- /dev/null +++ b/ProgramFirstLesson/Hm1Lesson1/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программным средством. +// Версия среды выполнения: 4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильному поведению и будут утрачены, если +// код создан повторно. +// +//------------------------------------------------------------------------------ + +namespace Hm1Lesson1.Properties +{ + + + /// + /// Класс ресурсов со строгим типом для поиска локализованных строк и пр. + /// + // Этот класс был автоматически создан при помощи StronglyTypedResourceBuilder + // класс с помощью таких средств, как ResGen или Visual Studio. + // Для добавления или удаления члена измените файл .ResX, а затем перезапустите ResGen + // с параметром /str или заново постройте свой VS-проект. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Возврат кэшированного экземпляра ResourceManager, используемого этим классом. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Hm1Lesson1.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Переопределяет свойство CurrentUICulture текущего потока для всех + /// подстановки ресурсов с помощью этого класса ресурсов со строгим типом. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/ProgramFirstLesson/Hm1Lesson1/Properties/Resources.resx b/ProgramFirstLesson/Hm1Lesson1/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/ProgramFirstLesson/Hm1Lesson1/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ProgramFirstLesson/Hm1Lesson1/Properties/Settings.Designer.cs b/ProgramFirstLesson/Hm1Lesson1/Properties/Settings.Designer.cs new file mode 100644 index 0000000..9c12024 --- /dev/null +++ b/ProgramFirstLesson/Hm1Lesson1/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Hm1Lesson1.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/ProgramFirstLesson/Hm1Lesson1/Properties/Settings.settings b/ProgramFirstLesson/Hm1Lesson1/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/ProgramFirstLesson/Hm1Lesson1/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/ProgramFirstLesson/Hm1Lesson1/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgramFirstLesson/Hm1Lesson1/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgramFirstLesson/Hm1Lesson1/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgramFirstLesson/Hm1Lesson1/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/ProgramFirstLesson/Hm1Lesson1/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..8cc801f Binary files /dev/null and b/ProgramFirstLesson/Hm1Lesson1/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/ProgramFirstLesson/Hm1Lesson1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgramFirstLesson/Hm1Lesson1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..ff78587 Binary files /dev/null and b/ProgramFirstLesson/Hm1Lesson1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgramFirstLesson/Hm1Lesson1/obj/Debug/Hm1Lesson1.csprojAssemblyReference.cache b/ProgramFirstLesson/Hm1Lesson1/obj/Debug/Hm1Lesson1.csprojAssemblyReference.cache new file mode 100644 index 0000000..738edbd Binary files /dev/null and b/ProgramFirstLesson/Hm1Lesson1/obj/Debug/Hm1Lesson1.csprojAssemblyReference.cache differ diff --git a/ProgramFirstLesson/HmLesson1.zip b/ProgramFirstLesson/HmLesson1.zip new file mode 100644 index 0000000..b716060 Binary files /dev/null and b/ProgramFirstLesson/HmLesson1.zip differ diff --git a/ProgramFirstLesson/Hw1/App.config b/ProgramFirstLesson/Hw1/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgramFirstLesson/Hw1/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgramFirstLesson/Hw1/Hw1.csproj b/ProgramFirstLesson/Hw1/Hw1.csproj new file mode 100644 index 0000000..075be58 --- /dev/null +++ b/ProgramFirstLesson/Hw1/Hw1.csproj @@ -0,0 +1,59 @@ + + + + + Debug + AnyCPU + {937C7240-E34B-4E95-936F-F49EBBA07B2F} + Exe + Hw1 + Hw1 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + {179f6e9c-8ed7-4184-a473-dd5ef6a40daa} + NameSpaceLesson1 + + + + \ No newline at end of file diff --git a/ProgramFirstLesson/Hw1/Program.cs b/ProgramFirstLesson/Hw1/Program.cs new file mode 100644 index 0000000..a1b422a --- /dev/null +++ b/ProgramFirstLesson/Hw1/Program.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hw1 +{ + class Program + { + static void Main(string[] args) + { + # region Считывание данных пользователя + /*string surname, name, age; + int height, weight;*/ + Console.Write("Введите фамилию: "); + var surname = Console.ReadLine(); + Console.Write("Введите имя: "); + var name = Console.ReadLine(); + Console.Write("Введите возраст: "); + var age = Console.ReadLine(); + Console.Write("Введите рост в сантиметрах: "); + var height = int.Parse(Console.ReadLine()); + Console.Write("Введите вес в килограммах: "); + var weight = int.Parse(Console.ReadLine()); + /*Console.Write("Введите город проживания: "); + town = Console.ReadLine(); + NameSpaceLesson1.Program.ReadUserData(out surname, out name, out age, out height, out weight, out town);*/ + #endregion + #region Конкатинация строк + Console.WriteLine("Фамилия: " + surname + ". Имя: " + name + ". Возраст: " + age + ". Рост: " + height + ". Вес: " + weight + "."); + #endregion + #region Форматированный вывод + Console.WriteLine("Фамилия: {0}. Имя: {1}. Возраст: {2}. Рост: {3}. Вес: {4}.", surname, name, age, height, weight); + #endregion + #region Интерполированный вывод + Console.WriteLine($"Фамилия: {surname}. Имя: {name}. Возраст: {age}. Рост: {height}. Вес: {weight}."); + #endregion + NameSpaceLesson1.Program.EndProgramm(); + NameSpaceLesson1.Program.CloseProgrammKey(); + } + } +} diff --git a/ProgramFirstLesson/Hw1/Properties/AssemblyInfo.cs b/ProgramFirstLesson/Hw1/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..770ab73 --- /dev/null +++ b/ProgramFirstLesson/Hw1/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("Hw1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Hw1")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("937c7240-e34b-4e95-936f-f49ebba07b2f")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgramFirstLesson/Hw1/bin/Debug/Hw1.exe b/ProgramFirstLesson/Hw1/bin/Debug/Hw1.exe new file mode 100644 index 0000000..dd2e2aa Binary files /dev/null and b/ProgramFirstLesson/Hw1/bin/Debug/Hw1.exe differ diff --git a/ProgramFirstLesson/Hw1/bin/Debug/Hw1.exe.config b/ProgramFirstLesson/Hw1/bin/Debug/Hw1.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgramFirstLesson/Hw1/bin/Debug/Hw1.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgramFirstLesson/Hw1/bin/Debug/Hw1.pdb b/ProgramFirstLesson/Hw1/bin/Debug/Hw1.pdb new file mode 100644 index 0000000..72f8a26 Binary files /dev/null and b/ProgramFirstLesson/Hw1/bin/Debug/Hw1.pdb differ diff --git a/ProgramFirstLesson/Hw1/bin/Debug/ProgramFirstLesson.exe b/ProgramFirstLesson/Hw1/bin/Debug/ProgramFirstLesson.exe new file mode 100644 index 0000000..80fb78d Binary files /dev/null and b/ProgramFirstLesson/Hw1/bin/Debug/ProgramFirstLesson.exe differ diff --git a/ProgramFirstLesson/Hw1/bin/Debug/ProgramFirstLesson.exe.config b/ProgramFirstLesson/Hw1/bin/Debug/ProgramFirstLesson.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgramFirstLesson/Hw1/bin/Debug/ProgramFirstLesson.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgramFirstLesson/Hw1/bin/Debug/ProgramFirstLesson.pdb b/ProgramFirstLesson/Hw1/bin/Debug/ProgramFirstLesson.pdb new file mode 100644 index 0000000..7a93288 Binary files /dev/null and b/ProgramFirstLesson/Hw1/bin/Debug/ProgramFirstLesson.pdb differ diff --git a/ProgramFirstLesson/Hw1/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgramFirstLesson/Hw1/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgramFirstLesson/Hw1/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgramFirstLesson/Hw1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgramFirstLesson/Hw1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..b933d8a Binary files /dev/null and b/ProgramFirstLesson/Hw1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgramFirstLesson/Hw1/obj/Debug/Hw1.csproj.CopyComplete b/ProgramFirstLesson/Hw1/obj/Debug/Hw1.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/ProgramFirstLesson/Hw1/obj/Debug/Hw1.csproj.CoreCompileInputs.cache b/ProgramFirstLesson/Hw1/obj/Debug/Hw1.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..8d886ed --- /dev/null +++ b/ProgramFirstLesson/Hw1/obj/Debug/Hw1.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +c21f2da4e9c3808fb93d0866d23d4bf35ebf9a60 diff --git a/ProgramFirstLesson/Hw1/obj/Debug/Hw1.csproj.FileListAbsolute.txt b/ProgramFirstLesson/Hw1/obj/Debug/Hw1.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..afaf1c1 --- /dev/null +++ b/ProgramFirstLesson/Hw1/obj/Debug/Hw1.csproj.FileListAbsolute.txt @@ -0,0 +1,11 @@ +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw1\bin\Debug\Hw1.exe.config +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw1\bin\Debug\Hw1.exe +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw1\bin\Debug\Hw1.pdb +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw1\bin\Debug\ProgramFirstLesson.exe +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw1\bin\Debug\ProgramFirstLesson.pdb +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw1\bin\Debug\ProgramFirstLesson.exe.config +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw1\obj\Debug\Hw1.csprojAssemblyReference.cache +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw1\obj\Debug\Hw1.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw1\obj\Debug\Hw1.csproj.CopyComplete +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw1\obj\Debug\Hw1.exe +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw1\obj\Debug\Hw1.pdb diff --git a/ProgramFirstLesson/Hw1/obj/Debug/Hw1.csprojAssemblyReference.cache b/ProgramFirstLesson/Hw1/obj/Debug/Hw1.csprojAssemblyReference.cache new file mode 100644 index 0000000..e9864cb Binary files /dev/null and b/ProgramFirstLesson/Hw1/obj/Debug/Hw1.csprojAssemblyReference.cache differ diff --git a/ProgramFirstLesson/Hw1/obj/Debug/Hw1.exe b/ProgramFirstLesson/Hw1/obj/Debug/Hw1.exe new file mode 100644 index 0000000..dd2e2aa Binary files /dev/null and b/ProgramFirstLesson/Hw1/obj/Debug/Hw1.exe differ diff --git a/ProgramFirstLesson/Hw1/obj/Debug/Hw1.pdb b/ProgramFirstLesson/Hw1/obj/Debug/Hw1.pdb new file mode 100644 index 0000000..72f8a26 Binary files /dev/null and b/ProgramFirstLesson/Hw1/obj/Debug/Hw1.pdb differ diff --git a/ProgramFirstLesson/Hw2/App.config b/ProgramFirstLesson/Hw2/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgramFirstLesson/Hw2/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgramFirstLesson/Hw2/Hw2.csproj b/ProgramFirstLesson/Hw2/Hw2.csproj new file mode 100644 index 0000000..bd2b49b --- /dev/null +++ b/ProgramFirstLesson/Hw2/Hw2.csproj @@ -0,0 +1,59 @@ + + + + + Debug + AnyCPU + {86820D8B-F49D-412F-BC3B-9D292587D90D} + Exe + Hw2 + Hw2 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + {179f6e9c-8ed7-4184-a473-dd5ef6a40daa} + NameSpaceLesson1 + + + + \ No newline at end of file diff --git a/ProgramFirstLesson/Hw2/Program.cs b/ProgramFirstLesson/Hw2/Program.cs new file mode 100644 index 0000000..e07f3e3 --- /dev/null +++ b/ProgramFirstLesson/Hw2/Program.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hw2 +{ + class Program + { + static void Main(string[] args) + { + #region Считывание данных пользователя + /*string surname, name, age, town; + int height, weight; + NameSpaceLesson1.Program.ReadUserData(out surname, out name, out age, out height, out weight, out town);*/ + Console.Write("Введите рост в сантиметрах: "); + var height = int.Parse(Console.ReadLine()); + Console.Write("Введите вес в килограммах: "); + var weight = int.Parse(Console.ReadLine()); + #endregion + #region Вывод массы тела + Console.WriteLine($"Индекс массы тела в кг/м^2: {weight * 10000 / (height * height)}."); + #endregion + NameSpaceLesson1.Program.EndProgramm(); + NameSpaceLesson1.Program.CloseProgrammKey(); + } + } +} diff --git a/ProgramFirstLesson/Hw2/Properties/AssemblyInfo.cs b/ProgramFirstLesson/Hw2/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..687767e --- /dev/null +++ b/ProgramFirstLesson/Hw2/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("Hw2")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Hw2")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("86820d8b-f49d-412f-bc3b-9d292587d90d")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgramFirstLesson/Hw2/bin/Debug/Hw2.exe b/ProgramFirstLesson/Hw2/bin/Debug/Hw2.exe new file mode 100644 index 0000000..a711e5f Binary files /dev/null and b/ProgramFirstLesson/Hw2/bin/Debug/Hw2.exe differ diff --git a/ProgramFirstLesson/Hw2/bin/Debug/Hw2.exe.config b/ProgramFirstLesson/Hw2/bin/Debug/Hw2.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgramFirstLesson/Hw2/bin/Debug/Hw2.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgramFirstLesson/Hw2/bin/Debug/Hw2.pdb b/ProgramFirstLesson/Hw2/bin/Debug/Hw2.pdb new file mode 100644 index 0000000..b10c7a6 Binary files /dev/null and b/ProgramFirstLesson/Hw2/bin/Debug/Hw2.pdb differ diff --git a/ProgramFirstLesson/Hw2/bin/Debug/ProgramFirstLesson.exe b/ProgramFirstLesson/Hw2/bin/Debug/ProgramFirstLesson.exe new file mode 100644 index 0000000..e200086 Binary files /dev/null and b/ProgramFirstLesson/Hw2/bin/Debug/ProgramFirstLesson.exe differ diff --git a/ProgramFirstLesson/Hw2/bin/Debug/ProgramFirstLesson.exe.config b/ProgramFirstLesson/Hw2/bin/Debug/ProgramFirstLesson.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgramFirstLesson/Hw2/bin/Debug/ProgramFirstLesson.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgramFirstLesson/Hw2/bin/Debug/ProgramFirstLesson.pdb b/ProgramFirstLesson/Hw2/bin/Debug/ProgramFirstLesson.pdb new file mode 100644 index 0000000..468aedf Binary files /dev/null and b/ProgramFirstLesson/Hw2/bin/Debug/ProgramFirstLesson.pdb differ diff --git a/ProgramFirstLesson/Hw2/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgramFirstLesson/Hw2/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgramFirstLesson/Hw2/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgramFirstLesson/Hw2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgramFirstLesson/Hw2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..2a3fb31 Binary files /dev/null and b/ProgramFirstLesson/Hw2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgramFirstLesson/Hw2/obj/Debug/Hw2.csproj.CopyComplete b/ProgramFirstLesson/Hw2/obj/Debug/Hw2.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/ProgramFirstLesson/Hw2/obj/Debug/Hw2.csproj.CoreCompileInputs.cache b/ProgramFirstLesson/Hw2/obj/Debug/Hw2.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..8d886ed --- /dev/null +++ b/ProgramFirstLesson/Hw2/obj/Debug/Hw2.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +c21f2da4e9c3808fb93d0866d23d4bf35ebf9a60 diff --git a/ProgramFirstLesson/Hw2/obj/Debug/Hw2.csproj.FileListAbsolute.txt b/ProgramFirstLesson/Hw2/obj/Debug/Hw2.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..3c8eb47 --- /dev/null +++ b/ProgramFirstLesson/Hw2/obj/Debug/Hw2.csproj.FileListAbsolute.txt @@ -0,0 +1,11 @@ +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw2\bin\Debug\Hw2.exe.config +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw2\bin\Debug\Hw2.exe +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw2\bin\Debug\Hw2.pdb +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw2\bin\Debug\ProgramFirstLesson.exe +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw2\bin\Debug\ProgramFirstLesson.pdb +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw2\bin\Debug\ProgramFirstLesson.exe.config +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw2\obj\Debug\Hw2.csprojAssemblyReference.cache +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw2\obj\Debug\Hw2.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw2\obj\Debug\Hw2.csproj.CopyComplete +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw2\obj\Debug\Hw2.exe +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw2\obj\Debug\Hw2.pdb diff --git a/ProgramFirstLesson/Hw2/obj/Debug/Hw2.csprojAssemblyReference.cache b/ProgramFirstLesson/Hw2/obj/Debug/Hw2.csprojAssemblyReference.cache new file mode 100644 index 0000000..a7bdf91 Binary files /dev/null and b/ProgramFirstLesson/Hw2/obj/Debug/Hw2.csprojAssemblyReference.cache differ diff --git a/ProgramFirstLesson/Hw2/obj/Debug/Hw2.exe b/ProgramFirstLesson/Hw2/obj/Debug/Hw2.exe new file mode 100644 index 0000000..a711e5f Binary files /dev/null and b/ProgramFirstLesson/Hw2/obj/Debug/Hw2.exe differ diff --git a/ProgramFirstLesson/Hw2/obj/Debug/Hw2.pdb b/ProgramFirstLesson/Hw2/obj/Debug/Hw2.pdb new file mode 100644 index 0000000..b10c7a6 Binary files /dev/null and b/ProgramFirstLesson/Hw2/obj/Debug/Hw2.pdb differ diff --git a/ProgramFirstLesson/Hw3/App.config b/ProgramFirstLesson/Hw3/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgramFirstLesson/Hw3/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgramFirstLesson/Hw3/Hw3.csproj b/ProgramFirstLesson/Hw3/Hw3.csproj new file mode 100644 index 0000000..c3bb80d --- /dev/null +++ b/ProgramFirstLesson/Hw3/Hw3.csproj @@ -0,0 +1,59 @@ + + + + + Debug + AnyCPU + {6B66C21C-A0CF-453C-93F8-E58BDDD245BF} + Exe + Hw3 + Hw3 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + {179f6e9c-8ed7-4184-a473-dd5ef6a40daa} + NameSpaceLesson1 + + + + \ No newline at end of file diff --git a/ProgramFirstLesson/Hw3/Program.cs b/ProgramFirstLesson/Hw3/Program.cs new file mode 100644 index 0000000..9dc86c4 --- /dev/null +++ b/ProgramFirstLesson/Hw3/Program.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hw3 +{ + class Program + { + static void Main(string[] args) + { + #region Ввод координат 2 точек для подсчёта расстояния + Console.WriteLine("Для подсчёта расстояния между 2 точками введи их координаты: "); + double x1, y1, x2, y2; + NameSpaceLesson1.Program.ReadingTwoCoordinats(out x1, out y1, out x2, out y2); + #endregion + #region Вывод расстояния между 2 точками + NameSpaceLesson1.Program.CalculatingDistance(x1, y1, x2, y2); + #endregion + NameSpaceLesson1.Program.EndProgramm(); + NameSpaceLesson1.Program.CloseProgrammKey(); + } + } +} diff --git a/ProgramFirstLesson/Hw3/Properties/AssemblyInfo.cs b/ProgramFirstLesson/Hw3/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..78ac61a --- /dev/null +++ b/ProgramFirstLesson/Hw3/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("Hw3")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Hw3")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("6b66c21c-a0cf-453c-93f8-e58bddd245bf")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgramFirstLesson/Hw3/bin/Debug/Hw3.exe b/ProgramFirstLesson/Hw3/bin/Debug/Hw3.exe new file mode 100644 index 0000000..5845061 Binary files /dev/null and b/ProgramFirstLesson/Hw3/bin/Debug/Hw3.exe differ diff --git a/ProgramFirstLesson/Hw3/bin/Debug/Hw3.exe.config b/ProgramFirstLesson/Hw3/bin/Debug/Hw3.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgramFirstLesson/Hw3/bin/Debug/Hw3.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgramFirstLesson/Hw3/bin/Debug/Hw3.pdb b/ProgramFirstLesson/Hw3/bin/Debug/Hw3.pdb new file mode 100644 index 0000000..238f4a2 Binary files /dev/null and b/ProgramFirstLesson/Hw3/bin/Debug/Hw3.pdb differ diff --git a/ProgramFirstLesson/Hw3/bin/Debug/ProgramFirstLesson.exe b/ProgramFirstLesson/Hw3/bin/Debug/ProgramFirstLesson.exe new file mode 100644 index 0000000..0f4ff0c Binary files /dev/null and b/ProgramFirstLesson/Hw3/bin/Debug/ProgramFirstLesson.exe differ diff --git a/ProgramFirstLesson/Hw3/bin/Debug/ProgramFirstLesson.exe.config b/ProgramFirstLesson/Hw3/bin/Debug/ProgramFirstLesson.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgramFirstLesson/Hw3/bin/Debug/ProgramFirstLesson.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgramFirstLesson/Hw3/bin/Debug/ProgramFirstLesson.pdb b/ProgramFirstLesson/Hw3/bin/Debug/ProgramFirstLesson.pdb new file mode 100644 index 0000000..3ff5bfc Binary files /dev/null and b/ProgramFirstLesson/Hw3/bin/Debug/ProgramFirstLesson.pdb differ diff --git a/ProgramFirstLesson/Hw3/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgramFirstLesson/Hw3/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgramFirstLesson/Hw3/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgramFirstLesson/Hw3/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgramFirstLesson/Hw3/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..ba4be73 Binary files /dev/null and b/ProgramFirstLesson/Hw3/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgramFirstLesson/Hw3/obj/Debug/Hw3.csproj.CopyComplete b/ProgramFirstLesson/Hw3/obj/Debug/Hw3.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/ProgramFirstLesson/Hw3/obj/Debug/Hw3.csproj.CoreCompileInputs.cache b/ProgramFirstLesson/Hw3/obj/Debug/Hw3.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..8d886ed --- /dev/null +++ b/ProgramFirstLesson/Hw3/obj/Debug/Hw3.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +c21f2da4e9c3808fb93d0866d23d4bf35ebf9a60 diff --git a/ProgramFirstLesson/Hw3/obj/Debug/Hw3.csproj.FileListAbsolute.txt b/ProgramFirstLesson/Hw3/obj/Debug/Hw3.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..ca697ef --- /dev/null +++ b/ProgramFirstLesson/Hw3/obj/Debug/Hw3.csproj.FileListAbsolute.txt @@ -0,0 +1,11 @@ +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw3\bin\Debug\Hw3.exe.config +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw3\bin\Debug\Hw3.exe +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw3\bin\Debug\Hw3.pdb +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw3\bin\Debug\ProgramFirstLesson.exe +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw3\bin\Debug\ProgramFirstLesson.pdb +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw3\bin\Debug\ProgramFirstLesson.exe.config +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw3\obj\Debug\Hw3.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw3\obj\Debug\Hw3.csproj.CopyComplete +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw3\obj\Debug\Hw3.exe +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw3\obj\Debug\Hw3.pdb +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw3\obj\Debug\Hw3.csprojAssemblyReference.cache diff --git a/ProgramFirstLesson/Hw3/obj/Debug/Hw3.csprojAssemblyReference.cache b/ProgramFirstLesson/Hw3/obj/Debug/Hw3.csprojAssemblyReference.cache new file mode 100644 index 0000000..6211d49 Binary files /dev/null and b/ProgramFirstLesson/Hw3/obj/Debug/Hw3.csprojAssemblyReference.cache differ diff --git a/ProgramFirstLesson/Hw3/obj/Debug/Hw3.exe b/ProgramFirstLesson/Hw3/obj/Debug/Hw3.exe new file mode 100644 index 0000000..5845061 Binary files /dev/null and b/ProgramFirstLesson/Hw3/obj/Debug/Hw3.exe differ diff --git a/ProgramFirstLesson/Hw3/obj/Debug/Hw3.pdb b/ProgramFirstLesson/Hw3/obj/Debug/Hw3.pdb new file mode 100644 index 0000000..238f4a2 Binary files /dev/null and b/ProgramFirstLesson/Hw3/obj/Debug/Hw3.pdb differ diff --git a/ProgramFirstLesson/Hw4/App.config b/ProgramFirstLesson/Hw4/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgramFirstLesson/Hw4/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgramFirstLesson/Hw4/Hw4.csproj b/ProgramFirstLesson/Hw4/Hw4.csproj new file mode 100644 index 0000000..fbaf3e7 --- /dev/null +++ b/ProgramFirstLesson/Hw4/Hw4.csproj @@ -0,0 +1,59 @@ + + + + + Debug + AnyCPU + {D27F7CC8-3DD3-47AB-8B4C-9556186C95B9} + Exe + Hw4 + Hw4 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + {179f6e9c-8ed7-4184-a473-dd5ef6a40daa} + NameSpaceLesson1 + + + + \ No newline at end of file diff --git a/ProgramFirstLesson/Hw4/Program.cs b/ProgramFirstLesson/Hw4/Program.cs new file mode 100644 index 0000000..5320fd5 --- /dev/null +++ b/ProgramFirstLesson/Hw4/Program.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hw4 +{ + class Program + { + static void Main(string[] args) + { + #region Обмен значениями двух переменных с использованием третьей + NameSpaceLesson1.Program.ChangeTwoVariables(); + #endregion + #region Обмен числовых переменных без третьей переменной: + int a = 1; + int b = 2; + a = a + b; + b = a - b; + a = a - b; + #endregion + NameSpaceLesson1.Program.EndProgramm(); + NameSpaceLesson1.Program.CloseProgrammKey(); + } + } +} diff --git a/ProgramFirstLesson/Hw4/Properties/AssemblyInfo.cs b/ProgramFirstLesson/Hw4/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..e583cec --- /dev/null +++ b/ProgramFirstLesson/Hw4/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("Hw4")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Hw4")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("d27f7cc8-3dd3-47ab-8b4c-9556186c95b9")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgramFirstLesson/Hw4/bin/Debug/Hw4.exe b/ProgramFirstLesson/Hw4/bin/Debug/Hw4.exe new file mode 100644 index 0000000..034df0d Binary files /dev/null and b/ProgramFirstLesson/Hw4/bin/Debug/Hw4.exe differ diff --git a/ProgramFirstLesson/Hw4/bin/Debug/Hw4.exe.config b/ProgramFirstLesson/Hw4/bin/Debug/Hw4.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgramFirstLesson/Hw4/bin/Debug/Hw4.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgramFirstLesson/Hw4/bin/Debug/Hw4.pdb b/ProgramFirstLesson/Hw4/bin/Debug/Hw4.pdb new file mode 100644 index 0000000..4d8c061 Binary files /dev/null and b/ProgramFirstLesson/Hw4/bin/Debug/Hw4.pdb differ diff --git a/ProgramFirstLesson/Hw4/bin/Debug/ProgramFirstLesson.exe b/ProgramFirstLesson/Hw4/bin/Debug/ProgramFirstLesson.exe new file mode 100644 index 0000000..0f4ff0c Binary files /dev/null and b/ProgramFirstLesson/Hw4/bin/Debug/ProgramFirstLesson.exe differ diff --git a/ProgramFirstLesson/Hw4/bin/Debug/ProgramFirstLesson.exe.config b/ProgramFirstLesson/Hw4/bin/Debug/ProgramFirstLesson.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgramFirstLesson/Hw4/bin/Debug/ProgramFirstLesson.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgramFirstLesson/Hw4/bin/Debug/ProgramFirstLesson.pdb b/ProgramFirstLesson/Hw4/bin/Debug/ProgramFirstLesson.pdb new file mode 100644 index 0000000..3ff5bfc Binary files /dev/null and b/ProgramFirstLesson/Hw4/bin/Debug/ProgramFirstLesson.pdb differ diff --git a/ProgramFirstLesson/Hw4/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgramFirstLesson/Hw4/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgramFirstLesson/Hw4/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgramFirstLesson/Hw4/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgramFirstLesson/Hw4/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..3881bab Binary files /dev/null and b/ProgramFirstLesson/Hw4/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgramFirstLesson/Hw4/obj/Debug/Hw4.csproj.CopyComplete b/ProgramFirstLesson/Hw4/obj/Debug/Hw4.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/ProgramFirstLesson/Hw4/obj/Debug/Hw4.csproj.CoreCompileInputs.cache b/ProgramFirstLesson/Hw4/obj/Debug/Hw4.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..8d886ed --- /dev/null +++ b/ProgramFirstLesson/Hw4/obj/Debug/Hw4.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +c21f2da4e9c3808fb93d0866d23d4bf35ebf9a60 diff --git a/ProgramFirstLesson/Hw4/obj/Debug/Hw4.csproj.FileListAbsolute.txt b/ProgramFirstLesson/Hw4/obj/Debug/Hw4.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..767a409 --- /dev/null +++ b/ProgramFirstLesson/Hw4/obj/Debug/Hw4.csproj.FileListAbsolute.txt @@ -0,0 +1,11 @@ +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw4\bin\Debug\Hw4.exe.config +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw4\bin\Debug\Hw4.exe +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw4\bin\Debug\Hw4.pdb +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw4\bin\Debug\ProgramFirstLesson.exe +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw4\bin\Debug\ProgramFirstLesson.pdb +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw4\bin\Debug\ProgramFirstLesson.exe.config +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw4\obj\Debug\Hw4.csprojAssemblyReference.cache +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw4\obj\Debug\Hw4.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw4\obj\Debug\Hw4.csproj.CopyComplete +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw4\obj\Debug\Hw4.exe +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw4\obj\Debug\Hw4.pdb diff --git a/ProgramFirstLesson/Hw4/obj/Debug/Hw4.csprojAssemblyReference.cache b/ProgramFirstLesson/Hw4/obj/Debug/Hw4.csprojAssemblyReference.cache new file mode 100644 index 0000000..666eedd Binary files /dev/null and b/ProgramFirstLesson/Hw4/obj/Debug/Hw4.csprojAssemblyReference.cache differ diff --git a/ProgramFirstLesson/Hw4/obj/Debug/Hw4.exe b/ProgramFirstLesson/Hw4/obj/Debug/Hw4.exe new file mode 100644 index 0000000..034df0d Binary files /dev/null and b/ProgramFirstLesson/Hw4/obj/Debug/Hw4.exe differ diff --git a/ProgramFirstLesson/Hw4/obj/Debug/Hw4.pdb b/ProgramFirstLesson/Hw4/obj/Debug/Hw4.pdb new file mode 100644 index 0000000..4d8c061 Binary files /dev/null and b/ProgramFirstLesson/Hw4/obj/Debug/Hw4.pdb differ diff --git a/ProgramFirstLesson/Hw5/App.config b/ProgramFirstLesson/Hw5/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgramFirstLesson/Hw5/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgramFirstLesson/Hw5/Hw5.csproj b/ProgramFirstLesson/Hw5/Hw5.csproj new file mode 100644 index 0000000..044c313 --- /dev/null +++ b/ProgramFirstLesson/Hw5/Hw5.csproj @@ -0,0 +1,59 @@ + + + + + Debug + AnyCPU + {B0AF5154-31ED-4521-88EB-E553D4600FB3} + Exe + Hw5 + Hw5 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + {179f6e9c-8ed7-4184-a473-dd5ef6a40daa} + NameSpaceLesson1 + + + + \ No newline at end of file diff --git a/ProgramFirstLesson/Hw5/Program.cs b/ProgramFirstLesson/Hw5/Program.cs new file mode 100644 index 0000000..15bbd55 --- /dev/null +++ b/ProgramFirstLesson/Hw5/Program.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hw5 +{ + class Program + { + static void Main(string[] args) + { + # region Считывание данных пользователя + string surname, name, town; + Console.Write("Введите фамилию: "); + surname = Console.ReadLine(); + Console.Write("Введите имя: "); + name = Console.ReadLine(); + Console.Write("Введите город проживания: "); + town = Console.ReadLine(); + #endregion + #region Вывод фамилии, имени и города в разных частях экрана + Console.WriteLine($"Фамилия: {surname}. Имя: {name}. Город проживания: {town}."); + Console.WriteLine($"Для вывода в центре экрана нажмите любую клавишу"); + Console.ReadKey(); + Console.Clear(); + var line = "Фамилия: " + surname + ". Имя: " + name + ". Город проживания: " + town + "."; + NameSpaceLesson1.Program.WriteCenter(surname, name, town, line); + #endregion + NameSpaceLesson1.Program.CloseProgrammKey(); + } + } +} diff --git a/ProgramFirstLesson/Hw5/Properties/AssemblyInfo.cs b/ProgramFirstLesson/Hw5/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..e8cddf9 --- /dev/null +++ b/ProgramFirstLesson/Hw5/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("Hw5")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Hw5")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("b0af5154-31ed-4521-88eb-e553d4600fb3")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgramFirstLesson/Hw5/bin/Debug/Hw5.exe b/ProgramFirstLesson/Hw5/bin/Debug/Hw5.exe new file mode 100644 index 0000000..77f3f67 Binary files /dev/null and b/ProgramFirstLesson/Hw5/bin/Debug/Hw5.exe differ diff --git a/ProgramFirstLesson/Hw5/bin/Debug/Hw5.exe.config b/ProgramFirstLesson/Hw5/bin/Debug/Hw5.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgramFirstLesson/Hw5/bin/Debug/Hw5.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgramFirstLesson/Hw5/bin/Debug/Hw5.pdb b/ProgramFirstLesson/Hw5/bin/Debug/Hw5.pdb new file mode 100644 index 0000000..8c62c64 Binary files /dev/null and b/ProgramFirstLesson/Hw5/bin/Debug/Hw5.pdb differ diff --git a/ProgramFirstLesson/Hw5/bin/Debug/ProgramFirstLesson.exe b/ProgramFirstLesson/Hw5/bin/Debug/ProgramFirstLesson.exe new file mode 100644 index 0000000..80fb78d Binary files /dev/null and b/ProgramFirstLesson/Hw5/bin/Debug/ProgramFirstLesson.exe differ diff --git a/ProgramFirstLesson/Hw5/bin/Debug/ProgramFirstLesson.exe.config b/ProgramFirstLesson/Hw5/bin/Debug/ProgramFirstLesson.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgramFirstLesson/Hw5/bin/Debug/ProgramFirstLesson.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgramFirstLesson/Hw5/bin/Debug/ProgramFirstLesson.pdb b/ProgramFirstLesson/Hw5/bin/Debug/ProgramFirstLesson.pdb new file mode 100644 index 0000000..7a93288 Binary files /dev/null and b/ProgramFirstLesson/Hw5/bin/Debug/ProgramFirstLesson.pdb differ diff --git a/ProgramFirstLesson/Hw5/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgramFirstLesson/Hw5/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgramFirstLesson/Hw5/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgramFirstLesson/Hw5/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgramFirstLesson/Hw5/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..55f882a Binary files /dev/null and b/ProgramFirstLesson/Hw5/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgramFirstLesson/Hw5/obj/Debug/Hw5.csproj.CopyComplete b/ProgramFirstLesson/Hw5/obj/Debug/Hw5.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/ProgramFirstLesson/Hw5/obj/Debug/Hw5.csproj.CoreCompileInputs.cache b/ProgramFirstLesson/Hw5/obj/Debug/Hw5.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..8d886ed --- /dev/null +++ b/ProgramFirstLesson/Hw5/obj/Debug/Hw5.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +c21f2da4e9c3808fb93d0866d23d4bf35ebf9a60 diff --git a/ProgramFirstLesson/Hw5/obj/Debug/Hw5.csproj.FileListAbsolute.txt b/ProgramFirstLesson/Hw5/obj/Debug/Hw5.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..47e2274 --- /dev/null +++ b/ProgramFirstLesson/Hw5/obj/Debug/Hw5.csproj.FileListAbsolute.txt @@ -0,0 +1,11 @@ +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw5\bin\Debug\Hw5.exe.config +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw5\bin\Debug\Hw5.exe +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw5\bin\Debug\Hw5.pdb +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw5\bin\Debug\ProgramFirstLesson.exe +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw5\bin\Debug\ProgramFirstLesson.pdb +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw5\bin\Debug\ProgramFirstLesson.exe.config +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw5\obj\Debug\Hw5.csprojAssemblyReference.cache +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw5\obj\Debug\Hw5.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw5\obj\Debug\Hw5.csproj.CopyComplete +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw5\obj\Debug\Hw5.exe +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\Hw5\obj\Debug\Hw5.pdb diff --git a/ProgramFirstLesson/Hw5/obj/Debug/Hw5.csprojAssemblyReference.cache b/ProgramFirstLesson/Hw5/obj/Debug/Hw5.csprojAssemblyReference.cache new file mode 100644 index 0000000..d03fae5 Binary files /dev/null and b/ProgramFirstLesson/Hw5/obj/Debug/Hw5.csprojAssemblyReference.cache differ diff --git a/ProgramFirstLesson/Hw5/obj/Debug/Hw5.exe b/ProgramFirstLesson/Hw5/obj/Debug/Hw5.exe new file mode 100644 index 0000000..77f3f67 Binary files /dev/null and b/ProgramFirstLesson/Hw5/obj/Debug/Hw5.exe differ diff --git a/ProgramFirstLesson/Hw5/obj/Debug/Hw5.pdb b/ProgramFirstLesson/Hw5/obj/Debug/Hw5.pdb new file mode 100644 index 0000000..8c62c64 Binary files /dev/null and b/ProgramFirstLesson/Hw5/obj/Debug/Hw5.pdb differ diff --git a/ProgramFirstLesson/ProgramFirstLesson.sln b/ProgramFirstLesson/ProgramFirstLesson.sln new file mode 100644 index 0000000..6212846 --- /dev/null +++ b/ProgramFirstLesson/ProgramFirstLesson.sln @@ -0,0 +1,55 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30413.136 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NameSpaceLesson1", "ProgramFirstLesson\NameSpaceLesson1.csproj", "{179F6E9C-8ED7-4184-A473-DD5EF6A40DAA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hw1", "Hw1\Hw1.csproj", "{937C7240-E34B-4E95-936F-F49EBBA07B2F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hw2", "Hw2\Hw2.csproj", "{86820D8B-F49D-412F-BC3B-9D292587D90D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hw3", "Hw3\Hw3.csproj", "{6B66C21C-A0CF-453C-93F8-E58BDDD245BF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hw4", "Hw4\Hw4.csproj", "{D27F7CC8-3DD3-47AB-8B4C-9556186C95B9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hw5", "Hw5\Hw5.csproj", "{B0AF5154-31ED-4521-88EB-E553D4600FB3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {179F6E9C-8ED7-4184-A473-DD5EF6A40DAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {179F6E9C-8ED7-4184-A473-DD5EF6A40DAA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {179F6E9C-8ED7-4184-A473-DD5EF6A40DAA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {179F6E9C-8ED7-4184-A473-DD5EF6A40DAA}.Release|Any CPU.Build.0 = Release|Any CPU + {937C7240-E34B-4E95-936F-F49EBBA07B2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {937C7240-E34B-4E95-936F-F49EBBA07B2F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {937C7240-E34B-4E95-936F-F49EBBA07B2F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {937C7240-E34B-4E95-936F-F49EBBA07B2F}.Release|Any CPU.Build.0 = Release|Any CPU + {86820D8B-F49D-412F-BC3B-9D292587D90D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {86820D8B-F49D-412F-BC3B-9D292587D90D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {86820D8B-F49D-412F-BC3B-9D292587D90D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {86820D8B-F49D-412F-BC3B-9D292587D90D}.Release|Any CPU.Build.0 = Release|Any CPU + {6B66C21C-A0CF-453C-93F8-E58BDDD245BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6B66C21C-A0CF-453C-93F8-E58BDDD245BF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6B66C21C-A0CF-453C-93F8-E58BDDD245BF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6B66C21C-A0CF-453C-93F8-E58BDDD245BF}.Release|Any CPU.Build.0 = Release|Any CPU + {D27F7CC8-3DD3-47AB-8B4C-9556186C95B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D27F7CC8-3DD3-47AB-8B4C-9556186C95B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D27F7CC8-3DD3-47AB-8B4C-9556186C95B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D27F7CC8-3DD3-47AB-8B4C-9556186C95B9}.Release|Any CPU.Build.0 = Release|Any CPU + {B0AF5154-31ED-4521-88EB-E553D4600FB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0AF5154-31ED-4521-88EB-E553D4600FB3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0AF5154-31ED-4521-88EB-E553D4600FB3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0AF5154-31ED-4521-88EB-E553D4600FB3}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {18A1FDC5-F2BF-4D2C-A7E2-443E44BAC525} + EndGlobalSection +EndGlobal diff --git a/ProgramFirstLesson/ProgramFirstLesson/App.config b/ProgramFirstLesson/ProgramFirstLesson/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgramFirstLesson/ProgramFirstLesson/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgramFirstLesson/ProgramFirstLesson/NameSpaceLesson1.csproj b/ProgramFirstLesson/ProgramFirstLesson/NameSpaceLesson1.csproj new file mode 100644 index 0000000..1bd1049 --- /dev/null +++ b/ProgramFirstLesson/ProgramFirstLesson/NameSpaceLesson1.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {179F6E9C-8ED7-4184-A473-DD5EF6A40DAA} + Exe + ProgramFirstLesson + ProgramFirstLesson + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ProgramFirstLesson/ProgramFirstLesson/Program.cs b/ProgramFirstLesson/ProgramFirstLesson/Program.cs new file mode 100644 index 0000000..964b0da --- /dev/null +++ b/ProgramFirstLesson/ProgramFirstLesson/Program.cs @@ -0,0 +1,137 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + + +namespace NameSpaceLesson1 //Это задание 6 +{ + public class Program + { + static void Main(string[] args) + { + # region Считывание данных пользователя + string surname, name, age, town; + int height, weight; + ReadUserData(out surname, out name, out age, out height, out weight, out town); + #endregion + #region Конкатинация строк + Console.WriteLine("Фамилия: " + surname + ". Имя: " + name + ". Возраст: " + age + ". Рост: " + height + ". Вес: " + weight + "."); + #endregion + #region Форматированный вывод + Console.WriteLine("Фамилия: {0}. Имя: {1}. Возраст: {2}. Рост: {3}. Вес: {4}.", surname, name, age, height, weight); + #endregion + #region Интерполированный вывод + Console.WriteLine($"Фамилия: {surname}. Имя: {name}. Возраст: {age}. Рост: {height}. Вес: {weight}."); + #endregion + #region Вывод массы тела + Console.WriteLine($"Индекс массы тела в кг/м^2: {weight * 10000 / (height * height)}."); + #endregion + #region Ввод координат 2 точек для подсчёта расстояния + Console.WriteLine("Для подсчёта расстояния между 2 точками введи их координаты: "); + double x1, y1, x2, y2; + ReadingTwoCoordinats(out x1, out y1, out x2, out y2); + #endregion + #region Вывод расстояния между 2 точками + CalculatingDistance(x1, y1, x2, y2); + #endregion + #region Обмен значениями двух переменных с использованием третьей + ChangeTwoVariables(); + #endregion + #region Обмен числовых переменных без третьей переменной: + int a = 1; + int b = 2; + a = a + b; + b = a - b; + a = a - b; + #endregion + #region Вывод фамилии, имени и города в разных частях экрана + Console.WriteLine($"Фамилия: {surname}. Имя: {name}. Город проживания: {town}."); + Console.WriteLine($"Для продолжения нажмите любую клавишу"); + Console.ReadKey(); + Console.Clear(); + var line = "Фамилия: " + surname + ". Имя: " + name + ". Город проживания: " + town + "."; + WriteCenter(surname, name, town, line); + #endregion + #region Подпись + EndProgramm(); + #endregion + CloseProgrammKey(); + } + #region Метод окончания программы + public static void EndProgramm() + { + Console.WriteLine("(c) Автор программы Жирнов Олег. 2020 г"); + } + #endregion + #region Метод вывода в центре экрана + public static void WriteCenter(string surname, string name, string town, string line) + { + Console.SetCursorPosition(Console.WindowWidth / 2 - line.Length / 2, Console.WindowHeight / 2); + Console.WriteLine($"Фамилия: {surname}. Имя: {name}. Город проживания: {town}."); + } + #endregion + #region Метод закрытия программы по кнопке + public static void CloseProgrammKey() + { + Console.SetCursorPosition(Console.WindowWidth / 2 - "Для выхода из программы нажмите любую клавишу".Length / 2, Console.WindowHeight / 2 + 1); + Console.WriteLine($"Для выхода из программы нажмите любую клавишу"); + Console.ReadKey(); + } + #endregion + #region Метод обмена значениями двух переменных с использованием третьей + public static void ChangeTwoVariables() + { + Console.WriteLine("Обмен значениями двух переменных."); + Console.Write("Введите значение первой переменной: "); + var variable1 = Console.ReadLine(); + Console.Write("Введите значение второй переменной: "); + var variable2 = Console.ReadLine(); + var i = variable1; + variable1 = variable2; + variable2 = i; + Console.WriteLine($"Первая переменная теперь: {variable1}."); + Console.WriteLine($"Вторая переменная теперь: {variable2}."); + } + #endregion + #region Метод считывания координат 2 точек + public static void ReadingTwoCoordinats(out double x1, out double y1, out double x2, out double y2) + { + Console.Write("Введите значение по оси координат X для первой точки: "); + x1 = Convert.ToDouble(Console.ReadLine()); + Console.Write("Введите значение по оси координат Y для первой точки: "); + y1 = Convert.ToDouble(Console.ReadLine()); + Console.Write("Введите значение по оси координат X для второй точки: "); + x2 = Convert.ToDouble(Console.ReadLine()); + Console.Write("Введите значение по оси координат Y для второй точки: "); + y2 = Convert.ToDouble(Console.ReadLine()); + } + #endregion + #region Метод считывания данных пользователя для Анкеты + public static void ReadUserData(out string surname, out string name, out string age, out int height, out int weight, out string town) + { + Console.Write("Введите фамилию: "); + surname = Console.ReadLine(); + Console.Write("Введите имя: "); + name = Console.ReadLine(); + Console.Write("Введите возраст: "); + age = Console.ReadLine(); + Console.Write("Введите рост в сантиметрах: "); + height = int.Parse(Console.ReadLine()); + Console.Write("Введите вес в килограммах: "); + weight = int.Parse(Console.ReadLine()); + Console.Write("Введите город проживания: "); + town = Console.ReadLine(); + } + #endregion + #region Метод подсчёта расстояния между точками + public static void CalculatingDistance(double x1, double y1, double x2, double y2) + { + double r = Math.Sqrt(Math.Pow(x2 - x1, 2) + Math.Pow(y2 - y1, 2)); + Console.WriteLine($"Расстояние между заданными точками: {r:f2}."); + } + #endregion + + } +} diff --git a/ProgramFirstLesson/ProgramFirstLesson/Properties/AssemblyInfo.cs b/ProgramFirstLesson/ProgramFirstLesson/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..97ce912 --- /dev/null +++ b/ProgramFirstLesson/ProgramFirstLesson/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("ProgramFirstLesson")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ProgramFirstLesson")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("179f6e9c-8ed7-4184-a473-dd5ef6a40daa")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgramFirstLesson/ProgramFirstLesson/bin/Debug/ProgramFirstLesson.exe b/ProgramFirstLesson/ProgramFirstLesson/bin/Debug/ProgramFirstLesson.exe new file mode 100644 index 0000000..80fb78d Binary files /dev/null and b/ProgramFirstLesson/ProgramFirstLesson/bin/Debug/ProgramFirstLesson.exe differ diff --git a/ProgramFirstLesson/ProgramFirstLesson/bin/Debug/ProgramFirstLesson.exe.config b/ProgramFirstLesson/ProgramFirstLesson/bin/Debug/ProgramFirstLesson.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgramFirstLesson/ProgramFirstLesson/bin/Debug/ProgramFirstLesson.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgramFirstLesson/ProgramFirstLesson/bin/Debug/ProgramFirstLesson.pdb b/ProgramFirstLesson/ProgramFirstLesson/bin/Debug/ProgramFirstLesson.pdb new file mode 100644 index 0000000..7a93288 Binary files /dev/null and b/ProgramFirstLesson/ProgramFirstLesson/bin/Debug/ProgramFirstLesson.pdb differ diff --git a/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..a2a5334 Binary files /dev/null and b/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/NameSpaceLesson1.csproj.CoreCompileInputs.cache b/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/NameSpaceLesson1.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0c63285 --- /dev/null +++ b/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/NameSpaceLesson1.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +2f1b5aa9ca9324e732c8dc8ad98b9a6b4836d80a diff --git a/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/NameSpaceLesson1.csproj.FileListAbsolute.txt b/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/NameSpaceLesson1.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..e65baed --- /dev/null +++ b/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/NameSpaceLesson1.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\ProgramFirstLesson\bin\Debug\ProgramFirstLesson.exe.config +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\ProgramFirstLesson\bin\Debug\ProgramFirstLesson.exe +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\ProgramFirstLesson\bin\Debug\ProgramFirstLesson.pdb +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\ProgramFirstLesson\obj\Debug\NameSpaceLesson1.csprojAssemblyReference.cache +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\ProgramFirstLesson\obj\Debug\NameSpaceLesson1.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\ProgramFirstLesson\obj\Debug\ProgramFirstLesson.exe +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\ProgramFirstLesson\obj\Debug\ProgramFirstLesson.pdb diff --git a/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/NameSpaceLesson1.csprojAssemblyReference.cache b/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/NameSpaceLesson1.csprojAssemblyReference.cache new file mode 100644 index 0000000..8b2ee19 Binary files /dev/null and b/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/NameSpaceLesson1.csprojAssemblyReference.cache differ diff --git a/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/ProgramFirstLesson.csproj.CoreCompileInputs.cache b/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/ProgramFirstLesson.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0c63285 --- /dev/null +++ b/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/ProgramFirstLesson.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +2f1b5aa9ca9324e732c8dc8ad98b9a6b4836d80a diff --git a/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/ProgramFirstLesson.csproj.FileListAbsolute.txt b/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/ProgramFirstLesson.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..deaec2c --- /dev/null +++ b/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/ProgramFirstLesson.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\ProgramFirstLesson\obj\Debug\ProgramFirstLesson.csprojAssemblyReference.cache +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\ProgramFirstLesson\obj\Debug\ProgramFirstLesson.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\ProgramFirstLesson\bin\Debug\ProgramFirstLesson.exe.config +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\ProgramFirstLesson\bin\Debug\ProgramFirstLesson.exe +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\ProgramFirstLesson\bin\Debug\ProgramFirstLesson.pdb +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\ProgramFirstLesson\obj\Debug\ProgramFirstLesson.exe +D:\ProgrC#\ProgrammFirstLesson\ProgramFirstLesson\ProgramFirstLesson\obj\Debug\ProgramFirstLesson.pdb diff --git a/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/ProgramFirstLesson.csprojAssemblyReference.cache b/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/ProgramFirstLesson.csprojAssemblyReference.cache new file mode 100644 index 0000000..3e3c969 Binary files /dev/null and b/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/ProgramFirstLesson.csprojAssemblyReference.cache differ diff --git a/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/ProgramFirstLesson.exe b/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/ProgramFirstLesson.exe new file mode 100644 index 0000000..80fb78d Binary files /dev/null and b/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/ProgramFirstLesson.exe differ diff --git a/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/ProgramFirstLesson.pdb b/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/ProgramFirstLesson.pdb new file mode 100644 index 0000000..7a93288 Binary files /dev/null and b/ProgramFirstLesson/ProgramFirstLesson/obj/Debug/ProgramFirstLesson.pdb differ diff --git a/ProgrammFifthLesson/.vs/ProgrammFifthLesson/v16/.suo b/ProgrammFifthLesson/.vs/ProgrammFifthLesson/v16/.suo new file mode 100644 index 0000000..b6f614b Binary files /dev/null and b/ProgrammFifthLesson/.vs/ProgrammFifthLesson/v16/.suo differ diff --git a/ProgrammFifthLesson/Hw1/App.config b/ProgrammFifthLesson/Hw1/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammFifthLesson/Hw1/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammFifthLesson/Hw1/Hw1.csproj b/ProgrammFifthLesson/Hw1/Hw1.csproj new file mode 100644 index 0000000..fc28644 --- /dev/null +++ b/ProgrammFifthLesson/Hw1/Hw1.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {EC700F1E-D813-45F9-B0BB-2A16E4CEF607} + Exe + Hw1 + Hw1 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ProgrammFifthLesson/Hw1/Program.cs b/ProgrammFifthLesson/Hw1/Program.cs new file mode 100644 index 0000000..78b7f9d --- /dev/null +++ b/ProgrammFifthLesson/Hw1/Program.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; + +namespace Hw1 +{ + class Program + { + static void Main(string[] args) + { + #region Условия задачи + /*Создать программу, которая будет проверять корректность ввода логина. Корректным логином будет строка от 2 до 10 символов, + содержащая только буквы латинского алфавита или цифры, при этом цифра не может быть первой: + а) без использования регулярных выражений; + б) **с использованием регулярных выражений.*/ + #endregion + Console.WriteLine($"Введите логин: "); + string str = Console.ReadLine(); + var i = 1; + bool prof = ((str[0]>= 'a') && (str[0] <= 'z')) || ((str[0] >= 'A') && (str[0] <= 'Z')); + while (prof && i < str.Length) + { + prof = prof && (Char.IsDigit(str[i])|| ((str[i] >= 'a') && (str[i] <= 'z')) || ((str[i] >= 'A') && (str[i] <= 'Z'))); + i++; + } + if (prof && (str.Length <= 10) && (str.Length >= 2)) + Console.WriteLine("Вы ввели допустимый логин!"); + else Console.WriteLine("Вы ввели плохой логин!"); + Console.WriteLine("--------------"); + + string pattern = @"^([a-zA-Z])([a-zA-Z0-9]){1,9}$"; + Regex regex = new Regex(pattern); + if (regex.IsMatch(str))Console.WriteLine("Вы ввели допустимый логин!"); + else Console.WriteLine("Вы ввели плохой логин!"); + + Console.ReadKey(); + } + } +} diff --git a/ProgrammFifthLesson/Hw1/Properties/AssemblyInfo.cs b/ProgrammFifthLesson/Hw1/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..332aa36 --- /dev/null +++ b/ProgrammFifthLesson/Hw1/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("Hw1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Hw1")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("ec700f1e-d813-45f9-b0bb-2a16e4cef607")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgrammFifthLesson/Hw1/bin/Debug/Hw1.exe b/ProgrammFifthLesson/Hw1/bin/Debug/Hw1.exe new file mode 100644 index 0000000..cec88c4 Binary files /dev/null and b/ProgrammFifthLesson/Hw1/bin/Debug/Hw1.exe differ diff --git a/ProgrammFifthLesson/Hw1/bin/Debug/Hw1.exe.config b/ProgrammFifthLesson/Hw1/bin/Debug/Hw1.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammFifthLesson/Hw1/bin/Debug/Hw1.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammFifthLesson/Hw1/bin/Debug/Hw1.pdb b/ProgrammFifthLesson/Hw1/bin/Debug/Hw1.pdb new file mode 100644 index 0000000..ea0463b Binary files /dev/null and b/ProgrammFifthLesson/Hw1/bin/Debug/Hw1.pdb differ diff --git a/ProgrammFifthLesson/Hw1/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgrammFifthLesson/Hw1/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgrammFifthLesson/Hw1/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgrammFifthLesson/Hw1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgrammFifthLesson/Hw1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..7afb5b3 Binary files /dev/null and b/ProgrammFifthLesson/Hw1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgrammFifthLesson/Hw1/obj/Debug/Hw1.csproj.CoreCompileInputs.cache b/ProgrammFifthLesson/Hw1/obj/Debug/Hw1.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0c63285 --- /dev/null +++ b/ProgrammFifthLesson/Hw1/obj/Debug/Hw1.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +2f1b5aa9ca9324e732c8dc8ad98b9a6b4836d80a diff --git a/ProgrammFifthLesson/Hw1/obj/Debug/Hw1.csproj.FileListAbsolute.txt b/ProgrammFifthLesson/Hw1/obj/Debug/Hw1.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..85573c6 --- /dev/null +++ b/ProgrammFifthLesson/Hw1/obj/Debug/Hw1.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +D:\ProgrC#\ProgrammFifthLesson\Hw1\bin\Debug\Hw1.exe.config +D:\ProgrC#\ProgrammFifthLesson\Hw1\bin\Debug\Hw1.exe +D:\ProgrC#\ProgrammFifthLesson\Hw1\bin\Debug\Hw1.pdb +D:\ProgrC#\ProgrammFifthLesson\Hw1\obj\Debug\Hw1.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammFifthLesson\Hw1\obj\Debug\Hw1.exe +D:\ProgrC#\ProgrammFifthLesson\Hw1\obj\Debug\Hw1.pdb +D:\ProgrC#\ProgrammFifthLesson\Hw1\obj\Debug\Hw1.csprojAssemblyReference.cache diff --git a/ProgrammFifthLesson/Hw1/obj/Debug/Hw1.csprojAssemblyReference.cache b/ProgrammFifthLesson/Hw1/obj/Debug/Hw1.csprojAssemblyReference.cache new file mode 100644 index 0000000..8b2ee19 Binary files /dev/null and b/ProgrammFifthLesson/Hw1/obj/Debug/Hw1.csprojAssemblyReference.cache differ diff --git a/ProgrammFifthLesson/Hw1/obj/Debug/Hw1.exe b/ProgrammFifthLesson/Hw1/obj/Debug/Hw1.exe new file mode 100644 index 0000000..cec88c4 Binary files /dev/null and b/ProgrammFifthLesson/Hw1/obj/Debug/Hw1.exe differ diff --git a/ProgrammFifthLesson/Hw1/obj/Debug/Hw1.pdb b/ProgrammFifthLesson/Hw1/obj/Debug/Hw1.pdb new file mode 100644 index 0000000..ea0463b Binary files /dev/null and b/ProgrammFifthLesson/Hw1/obj/Debug/Hw1.pdb differ diff --git a/ProgrammFifthLesson/Hw2/App.config b/ProgrammFifthLesson/Hw2/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammFifthLesson/Hw2/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammFifthLesson/Hw2/Hw2.csproj b/ProgrammFifthLesson/Hw2/Hw2.csproj new file mode 100644 index 0000000..0ac1f0c --- /dev/null +++ b/ProgrammFifthLesson/Hw2/Hw2.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {EF38C2CE-8352-497C-A35D-2C78C53184A7} + Exe + Hw2 + Hw2 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ProgrammFifthLesson/Hw2/Program.cs b/ProgrammFifthLesson/Hw2/Program.cs new file mode 100644 index 0000000..33bf1e6 --- /dev/null +++ b/ProgrammFifthLesson/Hw2/Program.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; + +namespace Hw2 +{ + class Program + { + static void Main(string[] args) + { + #region Условия задачи + /*Разработать статический класс Message, содержащий следующие статические методы для обработки текста: + а) Вывести только те слова сообщения, которые содержат не более n букв. + б) Удалить из сообщения все слова, которые заканчиваются на заданный символ. + в) Найти самое длинное слово сообщения. + г) Сформировать строку с помощью StringBuilder из самых длинных слов сообщения. + д) ***Создать метод, который производит частотный анализ текста. В качестве параметра в него передается массив слов и текст, + в качестве результата метод возвращает сколько раз каждое из слов массива входит в этот текст. Здесь требуется использовать класс Dictionary. + */ + #endregion + Console.WriteLine("Введите русский текст: "); + string text = Console.ReadLine(); + string pattern = @"\b[а-яА-ЯёЁ]{1,10}\b"; + Regex regex = new Regex(pattern); + Console.WriteLine(regex.IsMatch(text)); + var res = regex.Matches(text); + foreach (var item in res) + { + Console.WriteLine(item); + } + Console.WriteLine("--------"); + + string pattern1 = @"[а-яА-ЯёЁ]{1,}[^а][ ]\b"; + Regex regex1 = new Regex(pattern1); + Console.WriteLine(regex1.IsMatch(text)); + var res1 = regex1.Matches(text); + foreach (var item in res1) + { + Console.WriteLine(item); + } + Console.WriteLine("*********"); + + string[] ss = text.Split(new char[] { ' ' }); + int max = ss[0].Length; + string ssMax = ss[0]; + for (int i=1; i + + + + + \ No newline at end of file diff --git a/ProgrammFifthLesson/Hw2/bin/Debug/Hw2.pdb b/ProgrammFifthLesson/Hw2/bin/Debug/Hw2.pdb new file mode 100644 index 0000000..8fa0b54 Binary files /dev/null and b/ProgrammFifthLesson/Hw2/bin/Debug/Hw2.pdb differ diff --git a/ProgrammFifthLesson/Hw2/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgrammFifthLesson/Hw2/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgrammFifthLesson/Hw2/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgrammFifthLesson/Hw2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgrammFifthLesson/Hw2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..40e2d18 Binary files /dev/null and b/ProgrammFifthLesson/Hw2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgrammFifthLesson/Hw2/obj/Debug/Hw2.csproj.CoreCompileInputs.cache b/ProgrammFifthLesson/Hw2/obj/Debug/Hw2.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0c63285 --- /dev/null +++ b/ProgrammFifthLesson/Hw2/obj/Debug/Hw2.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +2f1b5aa9ca9324e732c8dc8ad98b9a6b4836d80a diff --git a/ProgrammFifthLesson/Hw2/obj/Debug/Hw2.csproj.FileListAbsolute.txt b/ProgrammFifthLesson/Hw2/obj/Debug/Hw2.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..ad97bde --- /dev/null +++ b/ProgrammFifthLesson/Hw2/obj/Debug/Hw2.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +D:\ProgrC#\ProgrammFifthLesson\Hw2\obj\Debug\Hw2.csprojAssemblyReference.cache +D:\ProgrC#\ProgrammFifthLesson\Hw2\obj\Debug\Hw2.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammFifthLesson\Hw2\bin\Debug\Hw2.exe.config +D:\ProgrC#\ProgrammFifthLesson\Hw2\bin\Debug\Hw2.exe +D:\ProgrC#\ProgrammFifthLesson\Hw2\bin\Debug\Hw2.pdb +D:\ProgrC#\ProgrammFifthLesson\Hw2\obj\Debug\Hw2.exe +D:\ProgrC#\ProgrammFifthLesson\Hw2\obj\Debug\Hw2.pdb diff --git a/ProgrammFifthLesson/Hw2/obj/Debug/Hw2.csprojAssemblyReference.cache b/ProgrammFifthLesson/Hw2/obj/Debug/Hw2.csprojAssemblyReference.cache new file mode 100644 index 0000000..24df8ab Binary files /dev/null and b/ProgrammFifthLesson/Hw2/obj/Debug/Hw2.csprojAssemblyReference.cache differ diff --git a/ProgrammFifthLesson/Hw2/obj/Debug/Hw2.exe b/ProgrammFifthLesson/Hw2/obj/Debug/Hw2.exe new file mode 100644 index 0000000..7dcaf8d Binary files /dev/null and b/ProgrammFifthLesson/Hw2/obj/Debug/Hw2.exe differ diff --git a/ProgrammFifthLesson/Hw2/obj/Debug/Hw2.pdb b/ProgrammFifthLesson/Hw2/obj/Debug/Hw2.pdb new file mode 100644 index 0000000..8fa0b54 Binary files /dev/null and b/ProgrammFifthLesson/Hw2/obj/Debug/Hw2.pdb differ diff --git a/ProgrammFifthLesson/Hw3/App.config b/ProgrammFifthLesson/Hw3/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammFifthLesson/Hw3/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammFifthLesson/Hw3/Hw3.csproj b/ProgrammFifthLesson/Hw3/Hw3.csproj new file mode 100644 index 0000000..49695bf --- /dev/null +++ b/ProgrammFifthLesson/Hw3/Hw3.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {3FD7E798-D494-49BE-84B2-BE312A440C35} + Exe + Hw3 + Hw3 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ProgrammFifthLesson/Hw3/Program.cs b/ProgrammFifthLesson/Hw3/Program.cs new file mode 100644 index 0000000..4d675d3 --- /dev/null +++ b/ProgrammFifthLesson/Hw3/Program.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hw3 +{ + class Program + { + static void Main(string[] args) + { + #region Условия задачи + /*Для двух строк написать метод, определяющий, является ли одна строка перестановкой другой. + Например: + badc являются перестановкой abcd.*/ + #endregion + + Console.WriteLine("Для сравнения, является ли первая строка перестановкой второй, введите первую строку: "); + string str1 = Console.ReadLine(); + Console.WriteLine("Введите вторую строку: "); + string str2 = Console.ReadLine(); + for (int i=str1.Length-1; i>=0; i--) + { + for (int j = str2.Length-1; j >= 0; j--) + { + if (str1[i] == str2[j]) + { str1 = str1.Remove(i, 1); str2 = str2.Remove(j, 1); break; } + } + } + if ((str2 == "")&&(str1 =="")) Console.WriteLine("Первая и вторая строка являются перестановкой друг друга!"); + else Console.WriteLine("Эти строки не являются друг другу перестановкой!"); + Console.ReadKey(); + } + + } +} diff --git a/ProgrammFifthLesson/Hw3/Properties/AssemblyInfo.cs b/ProgrammFifthLesson/Hw3/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..9ccef56 --- /dev/null +++ b/ProgrammFifthLesson/Hw3/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("Hw3")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Hw3")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("3fd7e798-d494-49be-84b2-be312a440c35")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgrammFifthLesson/Hw3/bin/Debug/Hw3.exe b/ProgrammFifthLesson/Hw3/bin/Debug/Hw3.exe new file mode 100644 index 0000000..adcd798 Binary files /dev/null and b/ProgrammFifthLesson/Hw3/bin/Debug/Hw3.exe differ diff --git a/ProgrammFifthLesson/Hw3/bin/Debug/Hw3.exe.config b/ProgrammFifthLesson/Hw3/bin/Debug/Hw3.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammFifthLesson/Hw3/bin/Debug/Hw3.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammFifthLesson/Hw3/bin/Debug/Hw3.pdb b/ProgrammFifthLesson/Hw3/bin/Debug/Hw3.pdb new file mode 100644 index 0000000..eb7a1c7 Binary files /dev/null and b/ProgrammFifthLesson/Hw3/bin/Debug/Hw3.pdb differ diff --git a/ProgrammFifthLesson/Hw3/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgrammFifthLesson/Hw3/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgrammFifthLesson/Hw3/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgrammFifthLesson/Hw3/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgrammFifthLesson/Hw3/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..ad5082c Binary files /dev/null and b/ProgrammFifthLesson/Hw3/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgrammFifthLesson/Hw3/obj/Debug/Hw3.csproj.CoreCompileInputs.cache b/ProgrammFifthLesson/Hw3/obj/Debug/Hw3.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0c63285 --- /dev/null +++ b/ProgrammFifthLesson/Hw3/obj/Debug/Hw3.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +2f1b5aa9ca9324e732c8dc8ad98b9a6b4836d80a diff --git a/ProgrammFifthLesson/Hw3/obj/Debug/Hw3.csproj.FileListAbsolute.txt b/ProgrammFifthLesson/Hw3/obj/Debug/Hw3.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..bbdacba --- /dev/null +++ b/ProgrammFifthLesson/Hw3/obj/Debug/Hw3.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +D:\ProgrC#\ProgrammFifthLesson\Hw3\bin\Debug\Hw3.exe.config +D:\ProgrC#\ProgrammFifthLesson\Hw3\bin\Debug\Hw3.exe +D:\ProgrC#\ProgrammFifthLesson\Hw3\bin\Debug\Hw3.pdb +D:\ProgrC#\ProgrammFifthLesson\Hw3\obj\Debug\Hw3.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammFifthLesson\Hw3\obj\Debug\Hw3.exe +D:\ProgrC#\ProgrammFifthLesson\Hw3\obj\Debug\Hw3.pdb +D:\ProgrC#\ProgrammFifthLesson\Hw3\obj\Debug\Hw3.csprojAssemblyReference.cache diff --git a/ProgrammFifthLesson/Hw3/obj/Debug/Hw3.csprojAssemblyReference.cache b/ProgrammFifthLesson/Hw3/obj/Debug/Hw3.csprojAssemblyReference.cache new file mode 100644 index 0000000..3e3c969 Binary files /dev/null and b/ProgrammFifthLesson/Hw3/obj/Debug/Hw3.csprojAssemblyReference.cache differ diff --git a/ProgrammFifthLesson/Hw3/obj/Debug/Hw3.exe b/ProgrammFifthLesson/Hw3/obj/Debug/Hw3.exe new file mode 100644 index 0000000..adcd798 Binary files /dev/null and b/ProgrammFifthLesson/Hw3/obj/Debug/Hw3.exe differ diff --git a/ProgrammFifthLesson/Hw3/obj/Debug/Hw3.pdb b/ProgrammFifthLesson/Hw3/obj/Debug/Hw3.pdb new file mode 100644 index 0000000..eb7a1c7 Binary files /dev/null and b/ProgrammFifthLesson/Hw3/obj/Debug/Hw3.pdb differ diff --git a/ProgrammFifthLesson/Hw4/App.config b/ProgrammFifthLesson/Hw4/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammFifthLesson/Hw4/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammFifthLesson/Hw4/Hw4.csproj b/ProgrammFifthLesson/Hw4/Hw4.csproj new file mode 100644 index 0000000..32a6554 --- /dev/null +++ b/ProgrammFifthLesson/Hw4/Hw4.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {FC670A90-2A85-4070-A3F8-4C1BFB879911} + Exe + Hw4 + Hw4 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ProgrammFifthLesson/Hw4/Program.cs b/ProgrammFifthLesson/Hw4/Program.cs new file mode 100644 index 0000000..87777ee --- /dev/null +++ b/ProgrammFifthLesson/Hw4/Program.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace Hw4 +{ + class Program + { + static void Main(string[] args) + { + #region Условия задачи + /*Задача ЕГЭ. + На вход программе подаются сведения о сдаче экзаменов учениками 9-х классов некоторой средней школы. + В первой строке сообщается количество учеников N, которое не меньше 10, но не превосходит 100, каждая из следующих N строк имеет следующий формат: + <Фамилия> <Имя> <оценки>, + где <Фамилия> — строка, состоящая не более чем из 20 символов, <Имя> — строка, состоящая не более чем из 15 символов, + <оценки> — через пробел три целых числа, соответствующие оценкам по пятибалльной системе. <Фамилия> и <Имя>, а также <Имя> и <оценки> + разделены одним пробелом. Пример входной строки: + Иванов Петр 4 5 3 + Требуется написать как можно более эффективную программу, которая будет выводить на экран фамилии и имена трёх худших по среднему баллу учеников. + Если среди остальных есть ученики, набравшие тот же средний балл, что и один из трёх худших, следует вывести и их фамилии и имена. + */ + #endregion + Console.WriteLine("Введите количество учеников: "); + uint all = uint.Parse(Console.ReadLine()); + Console.WriteLine("Введите данные учеников в следующем формате: <Фамилия> <Имя> <Оценка1> <Оценка2> <Оценка3>"); + //StreamReader sr = new StreamReader("..\\..\\data.txt"); + string s = ""; + int min1 = 100; + int min2 = 100; + int min3 = 100; + int count = 0; + string[,] ss = new string[3, all]; + //uint all = uint.Parse(sr.ReadLine()); + for (int i = 0; i < all; i++) + { + s = Console.ReadLine();//sr.ReadLine(); + string[] sr = s.Split(new char[] { ' ' }); + sr[2] = Convert.ToString(int.Parse(sr[2]) + int.Parse(sr[3]) + int.Parse(sr[4])); + for (int j = 0; j < 3; j++) ss[j, i] = sr[j]; + } + for (int i = 0; i < all; i++) + { + if ((int.Parse(ss[2, i]) < min1) && (int.Parse(ss[2, i]) != min2) && (int.Parse(ss[2, i]) != min3)) min1 = int.Parse(ss[2, i]); + } + for (int i = 0; i < all; i++) + { + if ((int.Parse(ss[2, i]) < min2) && (int.Parse(ss[2, i]) != min1) && (int.Parse(ss[2, i]) != min3)) min2 = int.Parse(ss[2, i]); + if (int.Parse(ss[2, i]) == min1) { count++; } + if (count == 2) break; + } + if (count != 2) + { + for (int i = 0; i < all; i++) + { + if ((int.Parse(ss[2, i]) < min3) && (int.Parse(ss[2, i]) != min1) && (int.Parse(ss[2, i]) != min2)) min3 = int.Parse(ss[2, i]); + if ((int.Parse(ss[2, i]) == min1) || (int.Parse(ss[2, i]) == min2)) break; + } + } + for (int i = 0; i < all; i++) + { + if ((int.Parse(ss[2, i]) == min1) || (int.Parse(ss[2, i]) == min2) || (int.Parse(ss[2, i]) == min3)) + Console.WriteLine(ss[0, i] + " " + ss[1, i]); + } + + Console.ReadKey(); + + } + } +} diff --git a/ProgrammFifthLesson/Hw4/Properties/AssemblyInfo.cs b/ProgrammFifthLesson/Hw4/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..c1f82b7 --- /dev/null +++ b/ProgrammFifthLesson/Hw4/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("Hw4")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Hw4")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("fc670a90-2a85-4070-a3f8-4c1bfb879911")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgrammFifthLesson/Hw4/bin/Debug/Hw4.exe b/ProgrammFifthLesson/Hw4/bin/Debug/Hw4.exe new file mode 100644 index 0000000..295b52b Binary files /dev/null and b/ProgrammFifthLesson/Hw4/bin/Debug/Hw4.exe differ diff --git a/ProgrammFifthLesson/Hw4/bin/Debug/Hw4.exe.config b/ProgrammFifthLesson/Hw4/bin/Debug/Hw4.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammFifthLesson/Hw4/bin/Debug/Hw4.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammFifthLesson/Hw4/bin/Debug/Hw4.pdb b/ProgrammFifthLesson/Hw4/bin/Debug/Hw4.pdb new file mode 100644 index 0000000..cf05c1a Binary files /dev/null and b/ProgrammFifthLesson/Hw4/bin/Debug/Hw4.pdb differ diff --git a/ProgrammFifthLesson/Hw4/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgrammFifthLesson/Hw4/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgrammFifthLesson/Hw4/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgrammFifthLesson/Hw4/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgrammFifthLesson/Hw4/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..c78559e Binary files /dev/null and b/ProgrammFifthLesson/Hw4/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgrammFifthLesson/Hw4/obj/Debug/Hw4.csproj.CoreCompileInputs.cache b/ProgrammFifthLesson/Hw4/obj/Debug/Hw4.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0c63285 --- /dev/null +++ b/ProgrammFifthLesson/Hw4/obj/Debug/Hw4.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +2f1b5aa9ca9324e732c8dc8ad98b9a6b4836d80a diff --git a/ProgrammFifthLesson/Hw4/obj/Debug/Hw4.csproj.FileListAbsolute.txt b/ProgrammFifthLesson/Hw4/obj/Debug/Hw4.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..594d37b --- /dev/null +++ b/ProgrammFifthLesson/Hw4/obj/Debug/Hw4.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +D:\ProgrC#\ProgrammFifthLesson\Hw4\obj\Debug\Hw4.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammFifthLesson\Hw4\bin\Debug\Hw4.exe.config +D:\ProgrC#\ProgrammFifthLesson\Hw4\bin\Debug\Hw4.exe +D:\ProgrC#\ProgrammFifthLesson\Hw4\bin\Debug\Hw4.pdb +D:\ProgrC#\ProgrammFifthLesson\Hw4\obj\Debug\Hw4.exe +D:\ProgrC#\ProgrammFifthLesson\Hw4\obj\Debug\Hw4.pdb +D:\ProgrC#\ProgrammFifthLesson\Hw4\obj\Debug\Hw4.csprojAssemblyReference.cache diff --git a/ProgrammFifthLesson/Hw4/obj/Debug/Hw4.csprojAssemblyReference.cache b/ProgrammFifthLesson/Hw4/obj/Debug/Hw4.csprojAssemblyReference.cache new file mode 100644 index 0000000..24df8ab Binary files /dev/null and b/ProgrammFifthLesson/Hw4/obj/Debug/Hw4.csprojAssemblyReference.cache differ diff --git a/ProgrammFifthLesson/Hw4/obj/Debug/Hw4.exe b/ProgrammFifthLesson/Hw4/obj/Debug/Hw4.exe new file mode 100644 index 0000000..295b52b Binary files /dev/null and b/ProgrammFifthLesson/Hw4/obj/Debug/Hw4.exe differ diff --git a/ProgrammFifthLesson/Hw4/obj/Debug/Hw4.pdb b/ProgrammFifthLesson/Hw4/obj/Debug/Hw4.pdb new file mode 100644 index 0000000..cf05c1a Binary files /dev/null and b/ProgrammFifthLesson/Hw4/obj/Debug/Hw4.pdb differ diff --git a/ProgrammFifthLesson/ProgrammFifthLesson.sln b/ProgrammFifthLesson/ProgrammFifthLesson.sln new file mode 100644 index 0000000..a544802 --- /dev/null +++ b/ProgrammFifthLesson/ProgrammFifthLesson.sln @@ -0,0 +1,49 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30413.136 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProgrammFifthLesson", "ProgrammFifthLesson\ProgrammFifthLesson.csproj", "{70D30912-DAEC-4BC8-8BF9-8B49620248C4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hw1", "Hw1\Hw1.csproj", "{EC700F1E-D813-45F9-B0BB-2A16E4CEF607}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hw2", "Hw2\Hw2.csproj", "{EF38C2CE-8352-497C-A35D-2C78C53184A7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hw3", "Hw3\Hw3.csproj", "{3FD7E798-D494-49BE-84B2-BE312A440C35}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hw4", "Hw4\Hw4.csproj", "{FC670A90-2A85-4070-A3F8-4C1BFB879911}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {70D30912-DAEC-4BC8-8BF9-8B49620248C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {70D30912-DAEC-4BC8-8BF9-8B49620248C4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {70D30912-DAEC-4BC8-8BF9-8B49620248C4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {70D30912-DAEC-4BC8-8BF9-8B49620248C4}.Release|Any CPU.Build.0 = Release|Any CPU + {EC700F1E-D813-45F9-B0BB-2A16E4CEF607}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EC700F1E-D813-45F9-B0BB-2A16E4CEF607}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EC700F1E-D813-45F9-B0BB-2A16E4CEF607}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EC700F1E-D813-45F9-B0BB-2A16E4CEF607}.Release|Any CPU.Build.0 = Release|Any CPU + {EF38C2CE-8352-497C-A35D-2C78C53184A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EF38C2CE-8352-497C-A35D-2C78C53184A7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EF38C2CE-8352-497C-A35D-2C78C53184A7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EF38C2CE-8352-497C-A35D-2C78C53184A7}.Release|Any CPU.Build.0 = Release|Any CPU + {3FD7E798-D494-49BE-84B2-BE312A440C35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3FD7E798-D494-49BE-84B2-BE312A440C35}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3FD7E798-D494-49BE-84B2-BE312A440C35}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3FD7E798-D494-49BE-84B2-BE312A440C35}.Release|Any CPU.Build.0 = Release|Any CPU + {FC670A90-2A85-4070-A3F8-4C1BFB879911}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FC670A90-2A85-4070-A3F8-4C1BFB879911}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FC670A90-2A85-4070-A3F8-4C1BFB879911}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FC670A90-2A85-4070-A3F8-4C1BFB879911}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {C29130AC-E8E2-4840-BAF6-14E9ABCE7B73} + EndGlobalSection +EndGlobal diff --git a/ProgrammFifthLesson/ProgrammFifthLesson/App.config b/ProgrammFifthLesson/ProgrammFifthLesson/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammFifthLesson/ProgrammFifthLesson/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammFifthLesson/ProgrammFifthLesson/Program.cs b/ProgrammFifthLesson/ProgrammFifthLesson/Program.cs new file mode 100644 index 0000000..db42c7c --- /dev/null +++ b/ProgrammFifthLesson/ProgrammFifthLesson/Program.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProgrammFifthLesson +{ + class Program + { + static void Main(string[] args) + { + + } + } +} diff --git a/ProgrammFifthLesson/ProgrammFifthLesson/ProgrammFifthLesson.csproj b/ProgrammFifthLesson/ProgrammFifthLesson/ProgrammFifthLesson.csproj new file mode 100644 index 0000000..68a34c8 --- /dev/null +++ b/ProgrammFifthLesson/ProgrammFifthLesson/ProgrammFifthLesson.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {70D30912-DAEC-4BC8-8BF9-8B49620248C4} + Exe + ProgrammFifthLesson + ProgrammFifthLesson + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ProgrammFifthLesson/ProgrammFifthLesson/Properties/AssemblyInfo.cs b/ProgrammFifthLesson/ProgrammFifthLesson/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..73eaec4 --- /dev/null +++ b/ProgrammFifthLesson/ProgrammFifthLesson/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("ProgrammFifthLesson")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ProgrammFifthLesson")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("70d30912-daec-4bc8-8bf9-8b49620248c4")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgrammFifthLesson/ProgrammFifthLesson/bin/Debug/ProgrammFifthLesson.exe b/ProgrammFifthLesson/ProgrammFifthLesson/bin/Debug/ProgrammFifthLesson.exe new file mode 100644 index 0000000..4b4f6e9 Binary files /dev/null and b/ProgrammFifthLesson/ProgrammFifthLesson/bin/Debug/ProgrammFifthLesson.exe differ diff --git a/ProgrammFifthLesson/ProgrammFifthLesson/bin/Debug/ProgrammFifthLesson.exe.config b/ProgrammFifthLesson/ProgrammFifthLesson/bin/Debug/ProgrammFifthLesson.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammFifthLesson/ProgrammFifthLesson/bin/Debug/ProgrammFifthLesson.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammFifthLesson/ProgrammFifthLesson/bin/Debug/ProgrammFifthLesson.pdb b/ProgrammFifthLesson/ProgrammFifthLesson/bin/Debug/ProgrammFifthLesson.pdb new file mode 100644 index 0000000..50c3e72 Binary files /dev/null and b/ProgrammFifthLesson/ProgrammFifthLesson/bin/Debug/ProgrammFifthLesson.pdb differ diff --git a/ProgrammFifthLesson/ProgrammFifthLesson/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgrammFifthLesson/ProgrammFifthLesson/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgrammFifthLesson/ProgrammFifthLesson/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgrammFifthLesson/ProgrammFifthLesson/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgrammFifthLesson/ProgrammFifthLesson/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..61a12ba Binary files /dev/null and b/ProgrammFifthLesson/ProgrammFifthLesson/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgrammFifthLesson/ProgrammFifthLesson/obj/Debug/ProgrammFifthLesson.csproj.CoreCompileInputs.cache b/ProgrammFifthLesson/ProgrammFifthLesson/obj/Debug/ProgrammFifthLesson.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0c63285 --- /dev/null +++ b/ProgrammFifthLesson/ProgrammFifthLesson/obj/Debug/ProgrammFifthLesson.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +2f1b5aa9ca9324e732c8dc8ad98b9a6b4836d80a diff --git a/ProgrammFifthLesson/ProgrammFifthLesson/obj/Debug/ProgrammFifthLesson.csproj.FileListAbsolute.txt b/ProgrammFifthLesson/ProgrammFifthLesson/obj/Debug/ProgrammFifthLesson.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..9880e33 --- /dev/null +++ b/ProgrammFifthLesson/ProgrammFifthLesson/obj/Debug/ProgrammFifthLesson.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +D:\ProgrC#\ProgrammFifthLesson\ProgrammFifthLesson\bin\Debug\ProgrammFifthLesson.exe.config +D:\ProgrC#\ProgrammFifthLesson\ProgrammFifthLesson\bin\Debug\ProgrammFifthLesson.exe +D:\ProgrC#\ProgrammFifthLesson\ProgrammFifthLesson\bin\Debug\ProgrammFifthLesson.pdb +D:\ProgrC#\ProgrammFifthLesson\ProgrammFifthLesson\obj\Debug\ProgrammFifthLesson.csprojAssemblyReference.cache +D:\ProgrC#\ProgrammFifthLesson\ProgrammFifthLesson\obj\Debug\ProgrammFifthLesson.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammFifthLesson\ProgrammFifthLesson\obj\Debug\ProgrammFifthLesson.exe +D:\ProgrC#\ProgrammFifthLesson\ProgrammFifthLesson\obj\Debug\ProgrammFifthLesson.pdb diff --git a/ProgrammFifthLesson/ProgrammFifthLesson/obj/Debug/ProgrammFifthLesson.csprojAssemblyReference.cache b/ProgrammFifthLesson/ProgrammFifthLesson/obj/Debug/ProgrammFifthLesson.csprojAssemblyReference.cache new file mode 100644 index 0000000..24df8ab Binary files /dev/null and b/ProgrammFifthLesson/ProgrammFifthLesson/obj/Debug/ProgrammFifthLesson.csprojAssemblyReference.cache differ diff --git a/ProgrammFifthLesson/ProgrammFifthLesson/obj/Debug/ProgrammFifthLesson.exe b/ProgrammFifthLesson/ProgrammFifthLesson/obj/Debug/ProgrammFifthLesson.exe new file mode 100644 index 0000000..4b4f6e9 Binary files /dev/null and b/ProgrammFifthLesson/ProgrammFifthLesson/obj/Debug/ProgrammFifthLesson.exe differ diff --git a/ProgrammFifthLesson/ProgrammFifthLesson/obj/Debug/ProgrammFifthLesson.pdb b/ProgrammFifthLesson/ProgrammFifthLesson/obj/Debug/ProgrammFifthLesson.pdb new file mode 100644 index 0000000..50c3e72 Binary files /dev/null and b/ProgrammFifthLesson/ProgrammFifthLesson/obj/Debug/ProgrammFifthLesson.pdb differ diff --git a/ProgrammFourLesson/.vs/ProgrammFourLesson/v16/.suo b/ProgrammFourLesson/.vs/ProgrammFourLesson/v16/.suo new file mode 100644 index 0000000..6f0ced9 Binary files /dev/null and b/ProgrammFourLesson/.vs/ProgrammFourLesson/v16/.suo differ diff --git a/ProgrammFourLesson/Hw1/App.config b/ProgrammFourLesson/Hw1/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammFourLesson/Hw1/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammFourLesson/Hw1/Hw1.csproj b/ProgrammFourLesson/Hw1/Hw1.csproj new file mode 100644 index 0000000..e493ce2 --- /dev/null +++ b/ProgrammFourLesson/Hw1/Hw1.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {63009CA1-CFED-4C05-877E-89021A69513B} + Exe + Hw1 + Hw1 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ProgrammFourLesson/Hw1/Program.cs b/ProgrammFourLesson/Hw1/Program.cs new file mode 100644 index 0000000..bd4450c --- /dev/null +++ b/ProgrammFourLesson/Hw1/Program.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace Hw1 +{ + class Program + { + static void Main(string[] args) + { + #region Условия задачи + /*Жирнов + Дан целочисленный массив из 20 элементов. Элементы массива могут принимать целые значения от –10 000 до 10 000 включительно. + Заполнить случайными числами. Написать программу, позволяющую найти и вывести количество пар элементов массива, в которых только одно число делится на 3. + В данной задаче под парой подразумевается два подряд идущих элемента массива. Например, для массива из пяти элементов: 6; 2; 9; –3; 6 ответ — 2. + */ + #endregion + int[] arrayRandom = new int[20]; + Random rnd = new Random(); + int count = 0; + int n = 10000; + arrayRandom[0] = rnd.Next(-n, n); + Console.WriteLine(arrayRandom[0]); + for (int i = 1; i < arrayRandom.Length; i++) + { + arrayRandom[i] = rnd.Next(-n, n); + if ((arrayRandom[i-1]%3==0) ^ (arrayRandom[i]%3==0)) count++; + Console.WriteLine(arrayRandom[i]); + } + Console.WriteLine($"Количество пар элементов массива, в которых только одно число делится на 3: {count}"); + Console.ReadKey(); + + } + } +} diff --git a/ProgrammFourLesson/Hw1/Properties/AssemblyInfo.cs b/ProgrammFourLesson/Hw1/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..53473f6 --- /dev/null +++ b/ProgrammFourLesson/Hw1/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("Hw1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Hw1")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("63009ca1-cfed-4c05-877e-89021a69513b")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgrammFourLesson/Hw1/bin/Debug/Hw1.exe b/ProgrammFourLesson/Hw1/bin/Debug/Hw1.exe new file mode 100644 index 0000000..dac41b7 Binary files /dev/null and b/ProgrammFourLesson/Hw1/bin/Debug/Hw1.exe differ diff --git a/ProgrammFourLesson/Hw1/bin/Debug/Hw1.exe.config b/ProgrammFourLesson/Hw1/bin/Debug/Hw1.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammFourLesson/Hw1/bin/Debug/Hw1.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammFourLesson/Hw1/bin/Debug/Hw1.pdb b/ProgrammFourLesson/Hw1/bin/Debug/Hw1.pdb new file mode 100644 index 0000000..61c2aaa Binary files /dev/null and b/ProgrammFourLesson/Hw1/bin/Debug/Hw1.pdb differ diff --git a/ProgrammFourLesson/Hw1/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgrammFourLesson/Hw1/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgrammFourLesson/Hw1/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgrammFourLesson/Hw1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgrammFourLesson/Hw1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..e43726a Binary files /dev/null and b/ProgrammFourLesson/Hw1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgrammFourLesson/Hw1/obj/Debug/Hw1.csproj.CoreCompileInputs.cache b/ProgrammFourLesson/Hw1/obj/Debug/Hw1.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0c63285 --- /dev/null +++ b/ProgrammFourLesson/Hw1/obj/Debug/Hw1.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +2f1b5aa9ca9324e732c8dc8ad98b9a6b4836d80a diff --git a/ProgrammFourLesson/Hw1/obj/Debug/Hw1.csproj.FileListAbsolute.txt b/ProgrammFourLesson/Hw1/obj/Debug/Hw1.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..5542582 --- /dev/null +++ b/ProgrammFourLesson/Hw1/obj/Debug/Hw1.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +D:\ProgrC#\ProgrammFourLesson\Hw1\bin\Debug\Hw1.exe.config +D:\ProgrC#\ProgrammFourLesson\Hw1\bin\Debug\Hw1.exe +D:\ProgrC#\ProgrammFourLesson\Hw1\bin\Debug\Hw1.pdb +D:\ProgrC#\ProgrammFourLesson\Hw1\obj\Debug\Hw1.csprojAssemblyReference.cache +D:\ProgrC#\ProgrammFourLesson\Hw1\obj\Debug\Hw1.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammFourLesson\Hw1\obj\Debug\Hw1.exe +D:\ProgrC#\ProgrammFourLesson\Hw1\obj\Debug\Hw1.pdb diff --git a/ProgrammFourLesson/Hw1/obj/Debug/Hw1.csprojAssemblyReference.cache b/ProgrammFourLesson/Hw1/obj/Debug/Hw1.csprojAssemblyReference.cache new file mode 100644 index 0000000..24df8ab Binary files /dev/null and b/ProgrammFourLesson/Hw1/obj/Debug/Hw1.csprojAssemblyReference.cache differ diff --git a/ProgrammFourLesson/Hw1/obj/Debug/Hw1.exe b/ProgrammFourLesson/Hw1/obj/Debug/Hw1.exe new file mode 100644 index 0000000..dac41b7 Binary files /dev/null and b/ProgrammFourLesson/Hw1/obj/Debug/Hw1.exe differ diff --git a/ProgrammFourLesson/Hw1/obj/Debug/Hw1.pdb b/ProgrammFourLesson/Hw1/obj/Debug/Hw1.pdb new file mode 100644 index 0000000..61c2aaa Binary files /dev/null and b/ProgrammFourLesson/Hw1/obj/Debug/Hw1.pdb differ diff --git a/ProgrammFourLesson/Hw2/App.config b/ProgrammFourLesson/Hw2/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammFourLesson/Hw2/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammFourLesson/Hw2/Hw2.csproj b/ProgrammFourLesson/Hw2/Hw2.csproj new file mode 100644 index 0000000..2ce0754 --- /dev/null +++ b/ProgrammFourLesson/Hw2/Hw2.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {C138ABCF-622E-414F-9607-25B3C463BA48} + Exe + Hw2 + Hw2 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ProgrammFourLesson/Hw2/Program.cs b/ProgrammFourLesson/Hw2/Program.cs new file mode 100644 index 0000000..3801133 --- /dev/null +++ b/ProgrammFourLesson/Hw2/Program.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.IO; + +namespace Hw2 +{ + #region Условия задачи + /*Жирнов + Реализуйте задачу 1 в виде статического класса StaticClass; + а) Класс должен содержать статический метод, который принимает на вход массив и решает задачу 1; + б) * Добавьте статический метод для считывания массива из текстового файла.Метод должен возвращать массив целых чисел; + в)** Добавьте обработку ситуации отсутствия файла на диске. + */ + #endregion + + class Program + { + static void Main(string[] args) + { + int[] arrayRandom = new int[20]; + Random rnd = new Random(); + int count = 0; + int n = 10000; + for (int i = 0; i < arrayRandom.Length; i++) + { + arrayRandom[i] = rnd.Next(-n, n); + Console.WriteLine(arrayRandom[i]); + } + count = StaticClass.Search3(arrayRandom, count); + Console.ReadKey(); + + try + { + TextToArray(); + for (int i = 0; i < TextToArray().Length; i++) + Console.WriteLine(TextToArray()[i]); + } + catch + { + Console.WriteLine("Такого файла нет"); + } + Console.ReadKey(); + } + + public static int[] TextToArray() + { + + // Создаем объект sr и связываем его с файлом data.txt. + StreamReader sr = new StreamReader("..\\..\\data.txt"); + int numbers = int.Parse(sr.ReadLine()); + // Считаем количество чисел + int[] arrayText = new int[numbers]; + for (int i = 0; i < numbers; i++) + { + arrayText[i] = int.Parse(sr.ReadLine()); + } + // Освобождаем файл data.txt для использования другими программами. + sr.Close(); + return arrayText; + + } + } + public static class StaticClass + { + public static int Search3(int[] arrayRandom, int count) + { + for (int i = 1; i < arrayRandom.Length; i++) + if ((arrayRandom[i - 1] % 3 == 0) ^ (arrayRandom[i] % 3 == 0)) count++; + Console.WriteLine($"Количество пар элементов массива, в которых только одно число делится на 3: {count}"); + return count; + } + } +} diff --git a/ProgrammFourLesson/Hw2/Properties/AssemblyInfo.cs b/ProgrammFourLesson/Hw2/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..07f2372 --- /dev/null +++ b/ProgrammFourLesson/Hw2/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("Hw2")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Hw2")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("c138abcf-622e-414f-9607-25b3c463ba48")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgrammFourLesson/Hw2/bin/Debug/Hw2.exe b/ProgrammFourLesson/Hw2/bin/Debug/Hw2.exe new file mode 100644 index 0000000..f29513b Binary files /dev/null and b/ProgrammFourLesson/Hw2/bin/Debug/Hw2.exe differ diff --git a/ProgrammFourLesson/Hw2/bin/Debug/Hw2.exe.config b/ProgrammFourLesson/Hw2/bin/Debug/Hw2.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammFourLesson/Hw2/bin/Debug/Hw2.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammFourLesson/Hw2/bin/Debug/Hw2.pdb b/ProgrammFourLesson/Hw2/bin/Debug/Hw2.pdb new file mode 100644 index 0000000..ed67acc Binary files /dev/null and b/ProgrammFourLesson/Hw2/bin/Debug/Hw2.pdb differ diff --git a/ProgrammFourLesson/Hw2/data.TXT b/ProgrammFourLesson/Hw2/data.TXT new file mode 100644 index 0000000..955a3b5 --- /dev/null +++ b/ProgrammFourLesson/Hw2/data.TXT @@ -0,0 +1,6 @@ +5 +5324 +123 +5436 +2312 +643 diff --git a/ProgrammFourLesson/Hw2/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgrammFourLesson/Hw2/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgrammFourLesson/Hw2/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgrammFourLesson/Hw2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgrammFourLesson/Hw2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..94f9000 Binary files /dev/null and b/ProgrammFourLesson/Hw2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgrammFourLesson/Hw2/obj/Debug/Hw2.csproj.CoreCompileInputs.cache b/ProgrammFourLesson/Hw2/obj/Debug/Hw2.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0c63285 --- /dev/null +++ b/ProgrammFourLesson/Hw2/obj/Debug/Hw2.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +2f1b5aa9ca9324e732c8dc8ad98b9a6b4836d80a diff --git a/ProgrammFourLesson/Hw2/obj/Debug/Hw2.csproj.FileListAbsolute.txt b/ProgrammFourLesson/Hw2/obj/Debug/Hw2.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..7dd78c9 --- /dev/null +++ b/ProgrammFourLesson/Hw2/obj/Debug/Hw2.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +D:\ProgrC#\ProgrammFourLesson\Hw2\obj\Debug\Hw2.csprojAssemblyReference.cache +D:\ProgrC#\ProgrammFourLesson\Hw2\obj\Debug\Hw2.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammFourLesson\Hw2\bin\Debug\Hw2.exe.config +D:\ProgrC#\ProgrammFourLesson\Hw2\bin\Debug\Hw2.exe +D:\ProgrC#\ProgrammFourLesson\Hw2\bin\Debug\Hw2.pdb +D:\ProgrC#\ProgrammFourLesson\Hw2\obj\Debug\Hw2.exe +D:\ProgrC#\ProgrammFourLesson\Hw2\obj\Debug\Hw2.pdb diff --git a/ProgrammFourLesson/Hw2/obj/Debug/Hw2.csprojAssemblyReference.cache b/ProgrammFourLesson/Hw2/obj/Debug/Hw2.csprojAssemblyReference.cache new file mode 100644 index 0000000..24df8ab Binary files /dev/null and b/ProgrammFourLesson/Hw2/obj/Debug/Hw2.csprojAssemblyReference.cache differ diff --git a/ProgrammFourLesson/Hw2/obj/Debug/Hw2.exe b/ProgrammFourLesson/Hw2/obj/Debug/Hw2.exe new file mode 100644 index 0000000..f29513b Binary files /dev/null and b/ProgrammFourLesson/Hw2/obj/Debug/Hw2.exe differ diff --git a/ProgrammFourLesson/Hw2/obj/Debug/Hw2.pdb b/ProgrammFourLesson/Hw2/obj/Debug/Hw2.pdb new file mode 100644 index 0000000..ed67acc Binary files /dev/null and b/ProgrammFourLesson/Hw2/obj/Debug/Hw2.pdb differ diff --git a/ProgrammFourLesson/Hw3/App.config b/ProgrammFourLesson/Hw3/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammFourLesson/Hw3/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammFourLesson/Hw3/Hw3.csproj b/ProgrammFourLesson/Hw3/Hw3.csproj new file mode 100644 index 0000000..7d69dc8 --- /dev/null +++ b/ProgrammFourLesson/Hw3/Hw3.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {49ED1B7C-4BDC-4CA2-B867-842C70CAE458} + Exe + Hw3 + Hw3 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ProgrammFourLesson/Hw3/Program.cs b/ProgrammFourLesson/Hw3/Program.cs new file mode 100644 index 0000000..2deee41 --- /dev/null +++ b/ProgrammFourLesson/Hw3/Program.cs @@ -0,0 +1,194 @@ +using doArray; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hw3 +{ + + class Program + { + static void Main(string[] args) + { + #region Условия задачи + /*Жирнов + а) Дописать класс для работы с одномерным массивом.Реализовать конструктор, создающий массив определенного размера и заполняющий массив числами от начального значения с заданным шагом. + Создать свойство Sum, которое возвращает сумму элементов массива, метод Inverse, возвращающий новый массив с измененными знаками у всех элементов массива + (старый массив, остается без изменений), метод Multi, умножающий каждый элемент массива на определённое число, свойство MaxCount, возвращающее количество максимальных элементов. + б)**Создать библиотеку содержащую класс для работы с массивом.Продемонстрировать работу библиотеки + е) ***Подсчитать частоту вхождения каждого элемента в массив(коллекция Dictionary< int,int>) + */ + #endregion + int x = 3; + int[] freq = new int[10]; + doArray.MyArray a = new doArray.MyArray(10, 0, 5); + int[] b = new int[10]; + Console.WriteLine(a.ToString()); + Console.WriteLine(); + Console.WriteLine(); + #region Dictionary + Dictionary d = a.ValuesCounters(); + foreach (KeyValuePair keyValue in d) + { + Console.WriteLine(keyValue.Key + " - " + keyValue.Value); + } + #endregion + Console.WriteLine(); + Console.WriteLine(); + Console.WriteLine(); + b = a.Inverse(); + for (int i = 0; i < b.Length; i++) + Console.Write(b[i] + " "); + Console.WriteLine(); + freq = a.freq(); + + for (int i = 0; i < freq.Length; i++) + if (freq[i]!=0) Console.WriteLine("Значение " + i + " встречается " + freq[i] + " раз"); + Console.WriteLine(); + Console.WriteLine(a.Sum); + Console.WriteLine(a.Max); + Console.WriteLine(a.Min); + Console.WriteLine(a.maxCount()); + Console.WriteLine(a.CountPositiv); + a.Multi(x); + Console.WriteLine(a.ToString()); + Console.ReadKey(); + + + } + } +} +namespace doArray +{ + class MyArray + { + int[] a; + // Создание массива и заполнение его одним значением el + public MyArray(int n, int el) + { + a = new int[n]; + for (int i = 0; i < n; i++) + a[i] = el; + } + //Создание массива определенного размера и заполняющий массив числами от начального значения с заданным шагом. + public MyArray(int n, int min, int step) + { + a = new int[n]; + a[0] = min; + for (int i = 1; i < n; i++) + a[i] = a[i - 1] + step; + } + public int Sum + { + get + { + int sum = 0; + for (int i = 1; i < a.Length; i++) + sum = sum + a[i]; + return sum; + } + } + # region Создание массива и заполнение его случайными числами от min до max + /*public MyArray(int n, int min, int max) + { + a = new int[n]; + Random rnd = new Random(); + for (int i = 0; i < n; i++) + a[i] = rnd.Next(min, max); + }*/ + #endregion + public int Max + { + get + { + int max = a[0]; + for (int i = 1; i < a.Length; i++) + if (a[i] > max) max = a[i]; + return max; + } + } + public int Min + { + get + { + int min = a[0]; + for (int i = 1; i < a.Length; i++) + if (a[i] < min) min = a[i]; + return min; + } + } + public int CountPositiv + { + get + { + int count = 0; + for (int i = 0; i < a.Length; i++) + if (a[i] > 0) count++; + return count; + } + } + public override string ToString() + { + string s = ""; + foreach (int v in a) + s = s + v + " "; + return s; + } + public int[] Inverse() + { + int[] inver = new int[a.Length]; + for (int i = 0; i < a.Length; i++) + inver[i] = -a[i]; + return inver; + } + + public void Multi(int x) + { + for (int i = 0; i < a.Length; i++) + a[i] = a[i] * x; + } + + public int maxCount() + { + int max = 0; + int maxCount = 0; + for (int i = 0; i < a.Length; i++) + if (a[i] > max) { max = a[i]; maxCount = 0; } + else if (a[i] == max) maxCount++; + return maxCount; + } + public int[] freq() + { + // Создаем частотный массив от 0 до 99 + int[] mass = new int[46]; + // Подсчитываем вхождение элементов + foreach (var v in a) mass[v]++;//Элемент массива a является номером в частотном массиве mass + return mass; + } + public Dictionary ValuesCounters() + { + Dictionary valueCounters = new Dictionary(); + int[] b = new int[a.Max() + 1]; + + foreach (int v in a) + { + b[v]++; + } + + for (int i = 0; i < a.Length; i++) + { + if (!valueCounters.ContainsKey(a[i])) + { + valueCounters.Add(a[i], b[a[i]]); + } + } + return valueCounters; + } + } +} + + + + diff --git a/ProgrammFourLesson/Hw3/Properties/AssemblyInfo.cs b/ProgrammFourLesson/Hw3/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..cd7d68a --- /dev/null +++ b/ProgrammFourLesson/Hw3/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("Hw3")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Hw3")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("49ed1b7c-4bdc-4ca2-b867-842c70cae458")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgrammFourLesson/Hw3/bin/Debug/Hw3.exe b/ProgrammFourLesson/Hw3/bin/Debug/Hw3.exe new file mode 100644 index 0000000..886da23 Binary files /dev/null and b/ProgrammFourLesson/Hw3/bin/Debug/Hw3.exe differ diff --git a/ProgrammFourLesson/Hw3/bin/Debug/Hw3.exe.config b/ProgrammFourLesson/Hw3/bin/Debug/Hw3.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammFourLesson/Hw3/bin/Debug/Hw3.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammFourLesson/Hw3/bin/Debug/Hw3.pdb b/ProgrammFourLesson/Hw3/bin/Debug/Hw3.pdb new file mode 100644 index 0000000..dd7089c Binary files /dev/null and b/ProgrammFourLesson/Hw3/bin/Debug/Hw3.pdb differ diff --git a/ProgrammFourLesson/Hw3/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgrammFourLesson/Hw3/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgrammFourLesson/Hw3/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgrammFourLesson/Hw3/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgrammFourLesson/Hw3/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..a0c9bde Binary files /dev/null and b/ProgrammFourLesson/Hw3/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgrammFourLesson/Hw3/obj/Debug/Hw3.csproj.CoreCompileInputs.cache b/ProgrammFourLesson/Hw3/obj/Debug/Hw3.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0c63285 --- /dev/null +++ b/ProgrammFourLesson/Hw3/obj/Debug/Hw3.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +2f1b5aa9ca9324e732c8dc8ad98b9a6b4836d80a diff --git a/ProgrammFourLesson/Hw3/obj/Debug/Hw3.csproj.FileListAbsolute.txt b/ProgrammFourLesson/Hw3/obj/Debug/Hw3.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..01eb9f4 --- /dev/null +++ b/ProgrammFourLesson/Hw3/obj/Debug/Hw3.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +D:\ProgrC#\ProgrammFourLesson\Hw3\obj\Debug\Hw3.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammFourLesson\Hw3\bin\Debug\Hw3.exe.config +D:\ProgrC#\ProgrammFourLesson\Hw3\bin\Debug\Hw3.exe +D:\ProgrC#\ProgrammFourLesson\Hw3\bin\Debug\Hw3.pdb +D:\ProgrC#\ProgrammFourLesson\Hw3\obj\Debug\Hw3.exe +D:\ProgrC#\ProgrammFourLesson\Hw3\obj\Debug\Hw3.pdb +D:\ProgrC#\ProgrammFourLesson\Hw3\obj\Debug\Hw3.csprojAssemblyReference.cache diff --git a/ProgrammFourLesson/Hw3/obj/Debug/Hw3.csprojAssemblyReference.cache b/ProgrammFourLesson/Hw3/obj/Debug/Hw3.csprojAssemblyReference.cache new file mode 100644 index 0000000..8b2ee19 Binary files /dev/null and b/ProgrammFourLesson/Hw3/obj/Debug/Hw3.csprojAssemblyReference.cache differ diff --git a/ProgrammFourLesson/Hw3/obj/Debug/Hw3.exe b/ProgrammFourLesson/Hw3/obj/Debug/Hw3.exe new file mode 100644 index 0000000..886da23 Binary files /dev/null and b/ProgrammFourLesson/Hw3/obj/Debug/Hw3.exe differ diff --git a/ProgrammFourLesson/Hw3/obj/Debug/Hw3.pdb b/ProgrammFourLesson/Hw3/obj/Debug/Hw3.pdb new file mode 100644 index 0000000..dd7089c Binary files /dev/null and b/ProgrammFourLesson/Hw3/obj/Debug/Hw3.pdb differ diff --git a/ProgrammFourLesson/Hw4/App.config b/ProgrammFourLesson/Hw4/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammFourLesson/Hw4/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammFourLesson/Hw4/Hw4.csproj b/ProgrammFourLesson/Hw4/Hw4.csproj new file mode 100644 index 0000000..40c6cbe --- /dev/null +++ b/ProgrammFourLesson/Hw4/Hw4.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {A3FB295A-EE1B-47D5-9B6E-8CABB2F47DFF} + Exe + Hw4 + Hw4 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ProgrammFourLesson/Hw4/Program.cs b/ProgrammFourLesson/Hw4/Program.cs new file mode 100644 index 0000000..e066e40 --- /dev/null +++ b/ProgrammFourLesson/Hw4/Program.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.IO; + +namespace Hw4 +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Жирнов. Реализовать метод проверки логина и пароля. На вход метода подается логин и пароль. На выходе истина, если прошел авторизацию, и ложь, если не прошел (Логин: root, Password: GeekBrains). Используя метод проверки логина и пароля, написать программу: пользователь вводит логин и пароль, программа пропускает его дальше или не пропускает. С помощью цикла do while ограничить ввод пароля тремя попытками."); + //Считываем верные данные из файла + StreamReader sr = new StreamReader("..\\..\\data.txt"); + string[] autorization = new string[2]; + autorization[0] = sr.ReadLine(); + autorization[1] = sr.ReadLine(); + string variant; + int count = 3; + bool success; + count = Program.Account.Autorization(autorization[0], autorization[1], out variant, count, out success); + Console.WriteLine($"Для выхода из программы нажмите любую клавишу"); + Console.ReadKey(); + } + + #region Метод прохождения авторизации + public struct Account + { + public static int Autorization(string login, string password, out string variant, int count, out bool success) + { + Console.WriteLine("Для того, чтобы пройти авторизацию введите ваши данные"); + do + { + success = true; + Console.WriteLine("Введите логин: "); + variant = Console.ReadLine(); + success = (success) && (variant == login); + Console.WriteLine("Введите пароль: "); + variant = Console.ReadLine(); + success = (success) && (variant == password); + count--; + } + while ((!success) && (count != 0)); + if (success) Console.WriteLine("Авторизация пройдена успешно!"); + else Console.WriteLine("Вы не справились с прохождением авторизцаии, рекомендую попробовать себя в чём-то ином!"); + return count; + } + } + #endregion + } +} diff --git a/ProgrammFourLesson/Hw4/Properties/AssemblyInfo.cs b/ProgrammFourLesson/Hw4/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..26449a8 --- /dev/null +++ b/ProgrammFourLesson/Hw4/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("Hw4")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Hw4")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("a3fb295a-ee1b-47d5-9b6e-8cabb2f47dff")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgrammFourLesson/Hw4/bin/Debug/Hw4.exe b/ProgrammFourLesson/Hw4/bin/Debug/Hw4.exe new file mode 100644 index 0000000..028f6b0 Binary files /dev/null and b/ProgrammFourLesson/Hw4/bin/Debug/Hw4.exe differ diff --git a/ProgrammFourLesson/Hw4/bin/Debug/Hw4.exe.config b/ProgrammFourLesson/Hw4/bin/Debug/Hw4.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammFourLesson/Hw4/bin/Debug/Hw4.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammFourLesson/Hw4/bin/Debug/Hw4.pdb b/ProgrammFourLesson/Hw4/bin/Debug/Hw4.pdb new file mode 100644 index 0000000..911e64d Binary files /dev/null and b/ProgrammFourLesson/Hw4/bin/Debug/Hw4.pdb differ diff --git a/ProgrammFourLesson/Hw4/data.TXT b/ProgrammFourLesson/Hw4/data.TXT new file mode 100644 index 0000000..f2e8d58 --- /dev/null +++ b/ProgrammFourLesson/Hw4/data.TXT @@ -0,0 +1,2 @@ +root +GeekBrains \ No newline at end of file diff --git a/ProgrammFourLesson/Hw4/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgrammFourLesson/Hw4/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgrammFourLesson/Hw4/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgrammFourLesson/Hw4/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgrammFourLesson/Hw4/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..f30b5f6 Binary files /dev/null and b/ProgrammFourLesson/Hw4/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgrammFourLesson/Hw4/obj/Debug/Hw4.csproj.CoreCompileInputs.cache b/ProgrammFourLesson/Hw4/obj/Debug/Hw4.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0c63285 --- /dev/null +++ b/ProgrammFourLesson/Hw4/obj/Debug/Hw4.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +2f1b5aa9ca9324e732c8dc8ad98b9a6b4836d80a diff --git a/ProgrammFourLesson/Hw4/obj/Debug/Hw4.csproj.FileListAbsolute.txt b/ProgrammFourLesson/Hw4/obj/Debug/Hw4.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..9a01757 --- /dev/null +++ b/ProgrammFourLesson/Hw4/obj/Debug/Hw4.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +D:\ProgrC#\ProgrammFourLesson\Hw4\obj\Debug\Hw4.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammFourLesson\Hw4\bin\Debug\Hw4.exe.config +D:\ProgrC#\ProgrammFourLesson\Hw4\bin\Debug\Hw4.exe +D:\ProgrC#\ProgrammFourLesson\Hw4\bin\Debug\Hw4.pdb +D:\ProgrC#\ProgrammFourLesson\Hw4\obj\Debug\Hw4.exe +D:\ProgrC#\ProgrammFourLesson\Hw4\obj\Debug\Hw4.pdb diff --git a/ProgrammFourLesson/Hw4/obj/Debug/Hw4.exe b/ProgrammFourLesson/Hw4/obj/Debug/Hw4.exe new file mode 100644 index 0000000..028f6b0 Binary files /dev/null and b/ProgrammFourLesson/Hw4/obj/Debug/Hw4.exe differ diff --git a/ProgrammFourLesson/Hw4/obj/Debug/Hw4.pdb b/ProgrammFourLesson/Hw4/obj/Debug/Hw4.pdb new file mode 100644 index 0000000..911e64d Binary files /dev/null and b/ProgrammFourLesson/Hw4/obj/Debug/Hw4.pdb differ diff --git a/ProgrammFourLesson/Hw5/App.config b/ProgrammFourLesson/Hw5/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammFourLesson/Hw5/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammFourLesson/Hw5/Hw5.csproj b/ProgrammFourLesson/Hw5/Hw5.csproj new file mode 100644 index 0000000..79a6a68 --- /dev/null +++ b/ProgrammFourLesson/Hw5/Hw5.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {E0F2F565-F18F-49D8-A121-9EBB87CF08F8} + Exe + Hw5 + Hw5 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ProgrammFourLesson/Hw5/Program.cs b/ProgrammFourLesson/Hw5/Program.cs new file mode 100644 index 0000000..1e40313 --- /dev/null +++ b/ProgrammFourLesson/Hw5/Program.cs @@ -0,0 +1,203 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.IO; + +namespace Hw5 +{ + static class DuoCount + { + public static int[] ReadArray(string str) + { + try + { + StreamReader ra = new StreamReader(str); + int n = int.Parse(ra.ReadLine()); + int[] txtarr = new int[n]; + for (int i = 0; i < n; i++) + { + txtarr[i] = int.Parse(ra.ReadLine()); + //Console.WriteLine(a); + } + ra.Close(); + return txtarr; + } + catch (FileNotFoundException) + { + Console.WriteLine("Файл не найден"); + } + return null; + } + + + } + #region Условия задачи + /*Жирнов + * а) Реализовать библиотеку с классом для работы с двумерным массивом.Реализовать конструктор, заполняющий массив случайными числами. + * Создать методы, которые возвращают сумму всех элементов массива, сумму всех элементов массива больше заданного, + * свойство, возвращающее минимальный элемент массива, свойство, возвращающее максимальный элемент массива, метод, + * возвращающий номер максимального элемента массива(через параметры, используя модификатор ref или out). + б) Добавить конструктор и методы, которые загружают данные из файла и записывают данные в файл. + в) Обработать возможные исключительные ситуации при работе с файлами.*/ + #endregion + class MyArrayTwoDim + { + int[,] a; + + public MyArrayTwoDim(int n, int el) + { + a = new int[n, n]; + for (int i = 0; i < n; i++) + for (int j = 0; j < n; j++) + a[i, j] = el; + } + public MyArrayTwoDim(int n, int min, int max) + { + a = new int[n, n]; + Random rnd = new Random(); + for (int i = 0; i < n; i++) + for (int j = 0; j < n; j++) + a[i, j] = rnd.Next(min, max); + } + public int Sum + { + get + { + int sum = 0; + for (int i = 0; i < a.GetLength(0); i++) + for (int j = 0; j < a.GetLength(1); j++) + sum = sum + a[i, j]; + return sum; + } + } + public int Sum2(int t) + { + int sum = 0; + for (int i = 0; i < a.GetLength(0); i++) + for (int j = 0; j < a.GetLength(1); j++) + if (a[i, j] > t) sum = sum + a[i, j]; + return sum; + } + public int Min + { + get + { + int min = a[0, 0]; + // Находим минимальный элемент + // В двухмерном массиве для получения размерности нужно использовать + // метод GetLength, а в скобках указывать измерение + for (int i = 0; i < a.GetLength(0); i++) + for (int j = 0; j < a.GetLength(1); j++) + if (a[i, j] < min) min = a[i, j]; + return min; + } + } + public void WriteArray() + { + StreamWriter write = new StreamWriter("..\\..\\write.txt", true); + for (int i = 0; i < a.GetLength(0); i++) + { + for (int j = 0; j < a.GetLength(1); j++) + { + write.Write(a[i, j] + " "); + } + write.WriteLine(); + } + write.Close(); + Console.WriteLine("Готово!"); + } + public int Max + { + get + { + int max = a[0, 0]; + for (int i = 0; i < a.GetLength(0); i++) + for (int j = 0; j < a.GetLength(1); j++) + if (a[i, j] > max) max = a[i, j]; + return max; + } + } + public void Maxi(out int countMaxi, out int countMaxj) + { + countMaxi = 1; + countMaxj = 1; + int max = a[0, 0]; + for (int i = 0; i < a.GetLength(0); i++) + for (int j = 0; j < a.GetLength(1); j++) + if (a[i, j] > max) { max = a[i, j]; countMaxi = i + 1; countMaxj = j + 1; } + + } + // Свойство - подсчет количества положительных + public int CountPositive + { + get + { + int count = 0; + for (int i = 0; i < a.GetLength(0); i++) + for (int j = 0; j < a.GetLength(1); j++) + if (a[i, j] > 0) count++; + return count; + } + } + // Свойство - подсчет среднего арифметического + public double Average + { + get + { + double sum = 0; + for (int i = 0; i < a.GetLength(0); i++) + for (int j = 0; j < a.GetLength(1); j++) + sum += a[i, j]; + return sum / a.GetLength(0) / a.GetLength(1); + } + + } + // Метод, который возвращает массив в виде строки + public override string ToString() + { + string s = ""; + for (int i = 0; i < a.GetLength(0); i++) + { + for (int j = 0; j < a.GetLength(1); j++) + s += a[i, j] + " "; + s += "\n"; // Переход на новую строчку + + } + return s; + } + } + class Program + { + static void Main(string[] args) + { + int t = 5; + MyArrayTwoDim a = new MyArrayTwoDim(2, 0, 10); + Console.WriteLine(a.ToString()); + Console.WriteLine("Сумма элементов: " + a.Sum); + Console.WriteLine("Сумма элементов больше 5: " + a.Sum2(t)); + Console.WriteLine("\nМаксимальный элемент:" + a.Max); + Console.WriteLine("Минимальный элемент:" + a.Min); + Console.WriteLine("Среднее значение элементов:" + a.Average); + int i, j; + a.Maxi(out i, out j); + Console.WriteLine($"Наибольший элемент находится в строке {i} и столбце {j}"); + + + string s = null; + string file = "..\\..\\data.txt"; + if (DuoCount.ReadArray(file) != null) + { + foreach (var item in DuoCount.ReadArray(file)) + { + s += " " + item; + } + } + Console.WriteLine(s); + + a.WriteArray(); + Console.ReadKey(); + } + } +} diff --git a/ProgrammFourLesson/Hw5/Properties/AssemblyInfo.cs b/ProgrammFourLesson/Hw5/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..bb5863e --- /dev/null +++ b/ProgrammFourLesson/Hw5/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("Hw5")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Hw5")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("e0f2f565-f18f-49d8-a121-9ebb87cf08f8")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgrammFourLesson/Hw5/bin/Debug/Hw5.exe b/ProgrammFourLesson/Hw5/bin/Debug/Hw5.exe new file mode 100644 index 0000000..2ca3375 Binary files /dev/null and b/ProgrammFourLesson/Hw5/bin/Debug/Hw5.exe differ diff --git a/ProgrammFourLesson/Hw5/bin/Debug/Hw5.exe.config b/ProgrammFourLesson/Hw5/bin/Debug/Hw5.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammFourLesson/Hw5/bin/Debug/Hw5.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammFourLesson/Hw5/bin/Debug/Hw5.pdb b/ProgrammFourLesson/Hw5/bin/Debug/Hw5.pdb new file mode 100644 index 0000000..1fcab00 Binary files /dev/null and b/ProgrammFourLesson/Hw5/bin/Debug/Hw5.pdb differ diff --git a/ProgrammFourLesson/Hw5/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgrammFourLesson/Hw5/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgrammFourLesson/Hw5/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgrammFourLesson/Hw5/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgrammFourLesson/Hw5/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..e31ca22 Binary files /dev/null and b/ProgrammFourLesson/Hw5/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgrammFourLesson/Hw5/obj/Debug/Hw5.csproj.CoreCompileInputs.cache b/ProgrammFourLesson/Hw5/obj/Debug/Hw5.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0c63285 --- /dev/null +++ b/ProgrammFourLesson/Hw5/obj/Debug/Hw5.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +2f1b5aa9ca9324e732c8dc8ad98b9a6b4836d80a diff --git a/ProgrammFourLesson/Hw5/obj/Debug/Hw5.csproj.FileListAbsolute.txt b/ProgrammFourLesson/Hw5/obj/Debug/Hw5.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..d7980f4 --- /dev/null +++ b/ProgrammFourLesson/Hw5/obj/Debug/Hw5.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +D:\ProgrC#\ProgrammFourLesson\Hw5\bin\Debug\Hw5.exe.config +D:\ProgrC#\ProgrammFourLesson\Hw5\bin\Debug\Hw5.exe +D:\ProgrC#\ProgrammFourLesson\Hw5\bin\Debug\Hw5.pdb +D:\ProgrC#\ProgrammFourLesson\Hw5\obj\Debug\Hw5.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammFourLesson\Hw5\obj\Debug\Hw5.exe +D:\ProgrC#\ProgrammFourLesson\Hw5\obj\Debug\Hw5.pdb diff --git a/ProgrammFourLesson/Hw5/obj/Debug/Hw5.exe b/ProgrammFourLesson/Hw5/obj/Debug/Hw5.exe new file mode 100644 index 0000000..2ca3375 Binary files /dev/null and b/ProgrammFourLesson/Hw5/obj/Debug/Hw5.exe differ diff --git a/ProgrammFourLesson/Hw5/obj/Debug/Hw5.pdb b/ProgrammFourLesson/Hw5/obj/Debug/Hw5.pdb new file mode 100644 index 0000000..1fcab00 Binary files /dev/null and b/ProgrammFourLesson/Hw5/obj/Debug/Hw5.pdb differ diff --git a/ProgrammFourLesson/Hw5/write.txt b/ProgrammFourLesson/Hw5/write.txt new file mode 100644 index 0000000..08877e3 --- /dev/null +++ b/ProgrammFourLesson/Hw5/write.txt @@ -0,0 +1,14 @@ +8 +1 +8 +8 +9 +3 +1 +4 +02 +30 +79 +68 +1 8 +3 2 diff --git a/ProgrammFourLesson/ProgrammFourLesson.sln b/ProgrammFourLesson/ProgrammFourLesson.sln new file mode 100644 index 0000000..5c8cba8 --- /dev/null +++ b/ProgrammFourLesson/ProgrammFourLesson.sln @@ -0,0 +1,55 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30413.136 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProgrammFourLesson", "ProgrammFourLesson\ProgrammFourLesson.csproj", "{C0B867AE-C9C5-4B05-B6EA-76AE874D442B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hw1", "Hw1\Hw1.csproj", "{63009CA1-CFED-4C05-877E-89021A69513B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hw2", "Hw2\Hw2.csproj", "{C138ABCF-622E-414F-9607-25B3C463BA48}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hw3", "Hw3\Hw3.csproj", "{49ED1B7C-4BDC-4CA2-B867-842C70CAE458}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hw4", "Hw4\Hw4.csproj", "{A3FB295A-EE1B-47D5-9B6E-8CABB2F47DFF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hw5", "Hw5\Hw5.csproj", "{E0F2F565-F18F-49D8-A121-9EBB87CF08F8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C0B867AE-C9C5-4B05-B6EA-76AE874D442B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C0B867AE-C9C5-4B05-B6EA-76AE874D442B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C0B867AE-C9C5-4B05-B6EA-76AE874D442B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C0B867AE-C9C5-4B05-B6EA-76AE874D442B}.Release|Any CPU.Build.0 = Release|Any CPU + {63009CA1-CFED-4C05-877E-89021A69513B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {63009CA1-CFED-4C05-877E-89021A69513B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {63009CA1-CFED-4C05-877E-89021A69513B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {63009CA1-CFED-4C05-877E-89021A69513B}.Release|Any CPU.Build.0 = Release|Any CPU + {C138ABCF-622E-414F-9607-25B3C463BA48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C138ABCF-622E-414F-9607-25B3C463BA48}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C138ABCF-622E-414F-9607-25B3C463BA48}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C138ABCF-622E-414F-9607-25B3C463BA48}.Release|Any CPU.Build.0 = Release|Any CPU + {49ED1B7C-4BDC-4CA2-B867-842C70CAE458}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {49ED1B7C-4BDC-4CA2-B867-842C70CAE458}.Debug|Any CPU.Build.0 = Debug|Any CPU + {49ED1B7C-4BDC-4CA2-B867-842C70CAE458}.Release|Any CPU.ActiveCfg = Release|Any CPU + {49ED1B7C-4BDC-4CA2-B867-842C70CAE458}.Release|Any CPU.Build.0 = Release|Any CPU + {A3FB295A-EE1B-47D5-9B6E-8CABB2F47DFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A3FB295A-EE1B-47D5-9B6E-8CABB2F47DFF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A3FB295A-EE1B-47D5-9B6E-8CABB2F47DFF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A3FB295A-EE1B-47D5-9B6E-8CABB2F47DFF}.Release|Any CPU.Build.0 = Release|Any CPU + {E0F2F565-F18F-49D8-A121-9EBB87CF08F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E0F2F565-F18F-49D8-A121-9EBB87CF08F8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E0F2F565-F18F-49D8-A121-9EBB87CF08F8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E0F2F565-F18F-49D8-A121-9EBB87CF08F8}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {5D5F0A23-BB4D-4926-9796-0A1B888F78DA} + EndGlobalSection +EndGlobal diff --git a/ProgrammFourLesson/ProgrammFourLesson/App.config b/ProgrammFourLesson/ProgrammFourLesson/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammFourLesson/ProgrammFourLesson/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammFourLesson/ProgrammFourLesson/Program.cs b/ProgrammFourLesson/ProgrammFourLesson/Program.cs new file mode 100644 index 0000000..a2f9b13 --- /dev/null +++ b/ProgrammFourLesson/ProgrammFourLesson/Program.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.IO; + +namespace ProgrammFourLesson +{ + class Program + { + static void Main(string[] args) + { + + } + } + +} diff --git a/ProgrammFourLesson/ProgrammFourLesson/ProgrammFourLesson.csproj b/ProgrammFourLesson/ProgrammFourLesson/ProgrammFourLesson.csproj new file mode 100644 index 0000000..204b173 --- /dev/null +++ b/ProgrammFourLesson/ProgrammFourLesson/ProgrammFourLesson.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {C0B867AE-C9C5-4B05-B6EA-76AE874D442B} + Exe + ProgrammFourLesson + ProgrammFourLesson + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ProgrammFourLesson/ProgrammFourLesson/Properties/AssemblyInfo.cs b/ProgrammFourLesson/ProgrammFourLesson/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..048da77 --- /dev/null +++ b/ProgrammFourLesson/ProgrammFourLesson/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("ProgrammFourLesson")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ProgrammFourLesson")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("c0b867ae-c9c5-4b05-b6ea-76ae874d442b")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgrammFourLesson/ProgrammFourLesson/bin/Debug/ProgrammFourLesson.exe b/ProgrammFourLesson/ProgrammFourLesson/bin/Debug/ProgrammFourLesson.exe new file mode 100644 index 0000000..a2543c7 Binary files /dev/null and b/ProgrammFourLesson/ProgrammFourLesson/bin/Debug/ProgrammFourLesson.exe differ diff --git a/ProgrammFourLesson/ProgrammFourLesson/bin/Debug/ProgrammFourLesson.exe.config b/ProgrammFourLesson/ProgrammFourLesson/bin/Debug/ProgrammFourLesson.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammFourLesson/ProgrammFourLesson/bin/Debug/ProgrammFourLesson.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammFourLesson/ProgrammFourLesson/bin/Debug/ProgrammFourLesson.pdb b/ProgrammFourLesson/ProgrammFourLesson/bin/Debug/ProgrammFourLesson.pdb new file mode 100644 index 0000000..4f1d538 Binary files /dev/null and b/ProgrammFourLesson/ProgrammFourLesson/bin/Debug/ProgrammFourLesson.pdb differ diff --git a/ProgrammFourLesson/ProgrammFourLesson/data.TXT b/ProgrammFourLesson/ProgrammFourLesson/data.TXT new file mode 100644 index 0000000..955a3b5 --- /dev/null +++ b/ProgrammFourLesson/ProgrammFourLesson/data.TXT @@ -0,0 +1,6 @@ +5 +5324 +123 +5436 +2312 +643 diff --git a/ProgrammFourLesson/ProgrammFourLesson/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgrammFourLesson/ProgrammFourLesson/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgrammFourLesson/ProgrammFourLesson/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgrammFourLesson/ProgrammFourLesson/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgrammFourLesson/ProgrammFourLesson/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..7c5b7a1 Binary files /dev/null and b/ProgrammFourLesson/ProgrammFourLesson/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgrammFourLesson/ProgrammFourLesson/obj/Debug/ProgrammFourLesson.csproj.CoreCompileInputs.cache b/ProgrammFourLesson/ProgrammFourLesson/obj/Debug/ProgrammFourLesson.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0c63285 --- /dev/null +++ b/ProgrammFourLesson/ProgrammFourLesson/obj/Debug/ProgrammFourLesson.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +2f1b5aa9ca9324e732c8dc8ad98b9a6b4836d80a diff --git a/ProgrammFourLesson/ProgrammFourLesson/obj/Debug/ProgrammFourLesson.csproj.FileListAbsolute.txt b/ProgrammFourLesson/ProgrammFourLesson/obj/Debug/ProgrammFourLesson.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..f1c2bdb --- /dev/null +++ b/ProgrammFourLesson/ProgrammFourLesson/obj/Debug/ProgrammFourLesson.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +D:\ProgrC#\ProgrammFourLesson\ProgrammFourLesson\bin\Debug\ProgrammFourLesson.exe.config +D:\ProgrC#\ProgrammFourLesson\ProgrammFourLesson\bin\Debug\ProgrammFourLesson.exe +D:\ProgrC#\ProgrammFourLesson\ProgrammFourLesson\bin\Debug\ProgrammFourLesson.pdb +D:\ProgrC#\ProgrammFourLesson\ProgrammFourLesson\obj\Debug\ProgrammFourLesson.csprojAssemblyReference.cache +D:\ProgrC#\ProgrammFourLesson\ProgrammFourLesson\obj\Debug\ProgrammFourLesson.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammFourLesson\ProgrammFourLesson\obj\Debug\ProgrammFourLesson.exe +D:\ProgrC#\ProgrammFourLesson\ProgrammFourLesson\obj\Debug\ProgrammFourLesson.pdb diff --git a/ProgrammFourLesson/ProgrammFourLesson/obj/Debug/ProgrammFourLesson.csprojAssemblyReference.cache b/ProgrammFourLesson/ProgrammFourLesson/obj/Debug/ProgrammFourLesson.csprojAssemblyReference.cache new file mode 100644 index 0000000..8b2ee19 Binary files /dev/null and b/ProgrammFourLesson/ProgrammFourLesson/obj/Debug/ProgrammFourLesson.csprojAssemblyReference.cache differ diff --git a/ProgrammFourLesson/ProgrammFourLesson/obj/Debug/ProgrammFourLesson.exe b/ProgrammFourLesson/ProgrammFourLesson/obj/Debug/ProgrammFourLesson.exe new file mode 100644 index 0000000..a2543c7 Binary files /dev/null and b/ProgrammFourLesson/ProgrammFourLesson/obj/Debug/ProgrammFourLesson.exe differ diff --git a/ProgrammFourLesson/ProgrammFourLesson/obj/Debug/ProgrammFourLesson.pdb b/ProgrammFourLesson/ProgrammFourLesson/obj/Debug/ProgrammFourLesson.pdb new file mode 100644 index 0000000..4f1d538 Binary files /dev/null and b/ProgrammFourLesson/ProgrammFourLesson/obj/Debug/ProgrammFourLesson.pdb differ diff --git a/ProgrammSecondLesson/.vs/ProgrammSecondLesson/v16/.suo b/ProgrammSecondLesson/.vs/ProgrammSecondLesson/v16/.suo new file mode 100644 index 0000000..1ddaaa2 Binary files /dev/null and b/ProgrammSecondLesson/.vs/ProgrammSecondLesson/v16/.suo differ diff --git a/ProgrammSecondLesson/Hw1/App.config b/ProgrammSecondLesson/Hw1/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammSecondLesson/Hw1/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw1/Hw1.csproj b/ProgrammSecondLesson/Hw1/Hw1.csproj new file mode 100644 index 0000000..1d7f24b --- /dev/null +++ b/ProgrammSecondLesson/Hw1/Hw1.csproj @@ -0,0 +1,59 @@ + + + + + Debug + AnyCPU + {C57D9A4D-4DB1-4F57-994B-7333E3D0ADA0} + Exe + Hw1 + Hw1 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + {c6d2c6b4-ca97-4228-981e-68ee6a847d9e} + ProgrammSecondLesson + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw1/Program.cs b/ProgrammSecondLesson/Hw1/Program.cs new file mode 100644 index 0000000..9fa2aa3 --- /dev/null +++ b/ProgrammSecondLesson/Hw1/Program.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hw1 +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Жирнов. Написать метод, возвращающий минимальное из трёх чисел."); + ProgrammSecondLesson.Program.Min3(); + ProgrammSecondLesson.Program.CloseProgrammKey(); + } + + #region Метод поиска минимального из трёх чисел + /*private static void Min3() + { + Console.WriteLine("Для того, чтобы найти наименьшее из трёх чисел:"); + Console.WriteLine("Введите первое число "); + double number1 = Convert.ToDouble(Console.ReadLine()); + Console.WriteLine("Введите второе число "); + double number2 = Convert.ToDouble(Console.ReadLine()); + Console.WriteLine("Введите третье число "); + double number3 = Convert.ToDouble(Console.ReadLine()); + if ((number1 < number2) && (number2 < number3)) Console.WriteLine($"Наименьшее число: " + number1); + else if (number2 < number3) Console.WriteLine($"Наименьшее число: " + number2); + else Console.WriteLine($"Наименьшее число: " + number3); + }*/ + #endregion + } +} diff --git a/ProgrammSecondLesson/Hw1/Properties/AssemblyInfo.cs b/ProgrammSecondLesson/Hw1/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..e7c52a5 --- /dev/null +++ b/ProgrammSecondLesson/Hw1/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("Hw1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Hw1")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("c57d9a4d-4db1-4f57-994b-7333e3d0ada0")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgrammSecondLesson/Hw1/bin/Debug/Hw1.exe b/ProgrammSecondLesson/Hw1/bin/Debug/Hw1.exe new file mode 100644 index 0000000..1811aa9 Binary files /dev/null and b/ProgrammSecondLesson/Hw1/bin/Debug/Hw1.exe differ diff --git a/ProgrammSecondLesson/Hw1/bin/Debug/Hw1.exe.config b/ProgrammSecondLesson/Hw1/bin/Debug/Hw1.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammSecondLesson/Hw1/bin/Debug/Hw1.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw1/bin/Debug/Hw1.pdb b/ProgrammSecondLesson/Hw1/bin/Debug/Hw1.pdb new file mode 100644 index 0000000..45b7852 Binary files /dev/null and b/ProgrammSecondLesson/Hw1/bin/Debug/Hw1.pdb differ diff --git a/ProgrammSecondLesson/Hw1/bin/Debug/ProgrammSecondLesson.exe b/ProgrammSecondLesson/Hw1/bin/Debug/ProgrammSecondLesson.exe new file mode 100644 index 0000000..615eb12 Binary files /dev/null and b/ProgrammSecondLesson/Hw1/bin/Debug/ProgrammSecondLesson.exe differ diff --git a/ProgrammSecondLesson/Hw1/bin/Debug/ProgrammSecondLesson.exe.config b/ProgrammSecondLesson/Hw1/bin/Debug/ProgrammSecondLesson.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammSecondLesson/Hw1/bin/Debug/ProgrammSecondLesson.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw1/bin/Debug/ProgrammSecondLesson.pdb b/ProgrammSecondLesson/Hw1/bin/Debug/ProgrammSecondLesson.pdb new file mode 100644 index 0000000..cb87eb3 Binary files /dev/null and b/ProgrammSecondLesson/Hw1/bin/Debug/ProgrammSecondLesson.pdb differ diff --git a/ProgrammSecondLesson/Hw1/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgrammSecondLesson/Hw1/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgrammSecondLesson/Hw1/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgrammSecondLesson/Hw1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgrammSecondLesson/Hw1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..e32053e Binary files /dev/null and b/ProgrammSecondLesson/Hw1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgrammSecondLesson/Hw1/obj/Debug/Hw1.csproj.CopyComplete b/ProgrammSecondLesson/Hw1/obj/Debug/Hw1.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/ProgrammSecondLesson/Hw1/obj/Debug/Hw1.csproj.CoreCompileInputs.cache b/ProgrammSecondLesson/Hw1/obj/Debug/Hw1.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..2312201 --- /dev/null +++ b/ProgrammSecondLesson/Hw1/obj/Debug/Hw1.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +b2fea9f9e788d3d9e8036446403904db4f1915f6 diff --git a/ProgrammSecondLesson/Hw1/obj/Debug/Hw1.csproj.FileListAbsolute.txt b/ProgrammSecondLesson/Hw1/obj/Debug/Hw1.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..96e4b52 --- /dev/null +++ b/ProgrammSecondLesson/Hw1/obj/Debug/Hw1.csproj.FileListAbsolute.txt @@ -0,0 +1,11 @@ +D:\ProgrC#\ProgrammSecondLesson\Hw1\bin\Debug\Hw1.exe.config +D:\ProgrC#\ProgrammSecondLesson\Hw1\bin\Debug\Hw1.exe +D:\ProgrC#\ProgrammSecondLesson\Hw1\bin\Debug\Hw1.pdb +D:\ProgrC#\ProgrammSecondLesson\Hw1\obj\Debug\Hw1.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammSecondLesson\Hw1\obj\Debug\Hw1.exe +D:\ProgrC#\ProgrammSecondLesson\Hw1\obj\Debug\Hw1.pdb +D:\ProgrC#\ProgrammSecondLesson\Hw1\bin\Debug\ProgrammSecondLesson.exe +D:\ProgrC#\ProgrammSecondLesson\Hw1\bin\Debug\ProgrammSecondLesson.pdb +D:\ProgrC#\ProgrammSecondLesson\Hw1\bin\Debug\ProgrammSecondLesson.exe.config +D:\ProgrC#\ProgrammSecondLesson\Hw1\obj\Debug\Hw1.csprojAssemblyReference.cache +D:\ProgrC#\ProgrammSecondLesson\Hw1\obj\Debug\Hw1.csproj.CopyComplete diff --git a/ProgrammSecondLesson/Hw1/obj/Debug/Hw1.csprojAssemblyReference.cache b/ProgrammSecondLesson/Hw1/obj/Debug/Hw1.csprojAssemblyReference.cache new file mode 100644 index 0000000..eea7582 Binary files /dev/null and b/ProgrammSecondLesson/Hw1/obj/Debug/Hw1.csprojAssemblyReference.cache differ diff --git a/ProgrammSecondLesson/Hw1/obj/Debug/Hw1.exe b/ProgrammSecondLesson/Hw1/obj/Debug/Hw1.exe new file mode 100644 index 0000000..1811aa9 Binary files /dev/null and b/ProgrammSecondLesson/Hw1/obj/Debug/Hw1.exe differ diff --git a/ProgrammSecondLesson/Hw1/obj/Debug/Hw1.pdb b/ProgrammSecondLesson/Hw1/obj/Debug/Hw1.pdb new file mode 100644 index 0000000..45b7852 Binary files /dev/null and b/ProgrammSecondLesson/Hw1/obj/Debug/Hw1.pdb differ diff --git a/ProgrammSecondLesson/Hw2/App.config b/ProgrammSecondLesson/Hw2/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammSecondLesson/Hw2/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw2/Hw2.csproj b/ProgrammSecondLesson/Hw2/Hw2.csproj new file mode 100644 index 0000000..47e834d --- /dev/null +++ b/ProgrammSecondLesson/Hw2/Hw2.csproj @@ -0,0 +1,59 @@ + + + + + Debug + AnyCPU + {55BD4F78-AB6F-49E0-8532-9EE082EC453E} + Exe + Hw2 + Hw2 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + {c6d2c6b4-ca97-4228-981e-68ee6a847d9e} + ProgrammSecondLesson + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw2/Program.cs b/ProgrammSecondLesson/Hw2/Program.cs new file mode 100644 index 0000000..d7b0ba4 --- /dev/null +++ b/ProgrammSecondLesson/Hw2/Program.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace Hw2 +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Жирнов. Написать метод подсчета количества цифр числа."); + ProgrammSecondLesson.Program.CountNumber(); + ProgrammSecondLesson.Program.CloseProgrammKey(); + } + + #region Метод вычисления колчичества цифр числа + /* + private static void CountNumber() + { + Console.WriteLine("Для того, чтобы узнать количество цифр введите число:"); + int number = Convert.ToInt32(Console.ReadLine()); + int Count = 0; + while (number != 0) + { + number = number / 10; + Count++; + } + Console.WriteLine($"В заданном числе " + Count + " цифр."); + }*/ + #endregion + } +} diff --git a/ProgrammSecondLesson/Hw2/Properties/AssemblyInfo.cs b/ProgrammSecondLesson/Hw2/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..b499046 --- /dev/null +++ b/ProgrammSecondLesson/Hw2/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("Hw2")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Hw2")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("55bd4f78-ab6f-49e0-8532-9ee082ec453e")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgrammSecondLesson/Hw2/bin/Debug/Hw2.exe b/ProgrammSecondLesson/Hw2/bin/Debug/Hw2.exe new file mode 100644 index 0000000..ef9294a Binary files /dev/null and b/ProgrammSecondLesson/Hw2/bin/Debug/Hw2.exe differ diff --git a/ProgrammSecondLesson/Hw2/bin/Debug/Hw2.exe.config b/ProgrammSecondLesson/Hw2/bin/Debug/Hw2.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammSecondLesson/Hw2/bin/Debug/Hw2.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw2/bin/Debug/Hw2.pdb b/ProgrammSecondLesson/Hw2/bin/Debug/Hw2.pdb new file mode 100644 index 0000000..d7963fa Binary files /dev/null and b/ProgrammSecondLesson/Hw2/bin/Debug/Hw2.pdb differ diff --git a/ProgrammSecondLesson/Hw2/bin/Debug/ProgrammSecondLesson.exe b/ProgrammSecondLesson/Hw2/bin/Debug/ProgrammSecondLesson.exe new file mode 100644 index 0000000..615eb12 Binary files /dev/null and b/ProgrammSecondLesson/Hw2/bin/Debug/ProgrammSecondLesson.exe differ diff --git a/ProgrammSecondLesson/Hw2/bin/Debug/ProgrammSecondLesson.exe.config b/ProgrammSecondLesson/Hw2/bin/Debug/ProgrammSecondLesson.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammSecondLesson/Hw2/bin/Debug/ProgrammSecondLesson.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw2/bin/Debug/ProgrammSecondLesson.pdb b/ProgrammSecondLesson/Hw2/bin/Debug/ProgrammSecondLesson.pdb new file mode 100644 index 0000000..cb87eb3 Binary files /dev/null and b/ProgrammSecondLesson/Hw2/bin/Debug/ProgrammSecondLesson.pdb differ diff --git a/ProgrammSecondLesson/Hw2/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgrammSecondLesson/Hw2/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgrammSecondLesson/Hw2/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgrammSecondLesson/Hw2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgrammSecondLesson/Hw2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..a0f5f08 Binary files /dev/null and b/ProgrammSecondLesson/Hw2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgrammSecondLesson/Hw2/obj/Debug/Hw2.csproj.CopyComplete b/ProgrammSecondLesson/Hw2/obj/Debug/Hw2.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/ProgrammSecondLesson/Hw2/obj/Debug/Hw2.csproj.CoreCompileInputs.cache b/ProgrammSecondLesson/Hw2/obj/Debug/Hw2.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..2312201 --- /dev/null +++ b/ProgrammSecondLesson/Hw2/obj/Debug/Hw2.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +b2fea9f9e788d3d9e8036446403904db4f1915f6 diff --git a/ProgrammSecondLesson/Hw2/obj/Debug/Hw2.csproj.FileListAbsolute.txt b/ProgrammSecondLesson/Hw2/obj/Debug/Hw2.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..33e71d3 --- /dev/null +++ b/ProgrammSecondLesson/Hw2/obj/Debug/Hw2.csproj.FileListAbsolute.txt @@ -0,0 +1,10 @@ +D:\ProgrC#\ProgrammSecondLesson\Hw2\bin\Debug\Hw2.exe.config +D:\ProgrC#\ProgrammSecondLesson\Hw2\bin\Debug\Hw2.exe +D:\ProgrC#\ProgrammSecondLesson\Hw2\bin\Debug\Hw2.pdb +D:\ProgrC#\ProgrammSecondLesson\Hw2\obj\Debug\Hw2.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammSecondLesson\Hw2\obj\Debug\Hw2.exe +D:\ProgrC#\ProgrammSecondLesson\Hw2\obj\Debug\Hw2.pdb +D:\ProgrC#\ProgrammSecondLesson\Hw2\bin\Debug\ProgrammSecondLesson.exe +D:\ProgrC#\ProgrammSecondLesson\Hw2\bin\Debug\ProgrammSecondLesson.pdb +D:\ProgrC#\ProgrammSecondLesson\Hw2\bin\Debug\ProgrammSecondLesson.exe.config +D:\ProgrC#\ProgrammSecondLesson\Hw2\obj\Debug\Hw2.csproj.CopyComplete diff --git a/ProgrammSecondLesson/Hw2/obj/Debug/Hw2.exe b/ProgrammSecondLesson/Hw2/obj/Debug/Hw2.exe new file mode 100644 index 0000000..ef9294a Binary files /dev/null and b/ProgrammSecondLesson/Hw2/obj/Debug/Hw2.exe differ diff --git a/ProgrammSecondLesson/Hw2/obj/Debug/Hw2.pdb b/ProgrammSecondLesson/Hw2/obj/Debug/Hw2.pdb new file mode 100644 index 0000000..d7963fa Binary files /dev/null and b/ProgrammSecondLesson/Hw2/obj/Debug/Hw2.pdb differ diff --git a/ProgrammSecondLesson/Hw3/App.config b/ProgrammSecondLesson/Hw3/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammSecondLesson/Hw3/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw3/Hw3.csproj b/ProgrammSecondLesson/Hw3/Hw3.csproj new file mode 100644 index 0000000..d4e8c44 --- /dev/null +++ b/ProgrammSecondLesson/Hw3/Hw3.csproj @@ -0,0 +1,59 @@ + + + + + Debug + AnyCPU + {9138DBBB-CD77-46F7-BE99-722AECE750EE} + Exe + Hw3 + Hw3 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + {c6d2c6b4-ca97-4228-981e-68ee6a847d9e} + ProgrammSecondLesson + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw3/Program.cs b/ProgrammSecondLesson/Hw3/Program.cs new file mode 100644 index 0000000..b11159d --- /dev/null +++ b/ProgrammSecondLesson/Hw3/Program.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hw3 +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Жирнов. С клавиатуры вводятся числа, пока не будет введен 0. Подсчитать сумму всех нечетных положительных чисел."); + int sum = 0; + int number = 0; + Console.WriteLine("Для того, чтобы вычислить сумму всех нечётных положительных чисел задайте их. Для окончания ввода чисел введите 0"); + number = ProgrammSecondLesson.Program.SumNaturalOdd(ref sum); + Console.WriteLine("Сумма всех нечётных положительных чисел: " + sum); + ProgrammSecondLesson.Program.CloseProgrammKey(); + } + + #region Метод вычисления суммы нечётных положительных чисел + /*private static int SumNaturalOdd(ref int sum) + { + int number; + do + { + Console.WriteLine("Введите число: "); + number = Convert.ToInt32(Console.ReadLine()); + if ((number % 2) == 1) sum = sum + number; + } + while (number != 0); + return number; + }*/ + #endregion + } +} diff --git a/ProgrammSecondLesson/Hw3/Properties/AssemblyInfo.cs b/ProgrammSecondLesson/Hw3/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..bd201bc --- /dev/null +++ b/ProgrammSecondLesson/Hw3/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("Hw3")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Hw3")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("9138dbbb-cd77-46f7-be99-722aece750ee")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgrammSecondLesson/Hw3/bin/Debug/Hw3.exe b/ProgrammSecondLesson/Hw3/bin/Debug/Hw3.exe new file mode 100644 index 0000000..b5fa306 Binary files /dev/null and b/ProgrammSecondLesson/Hw3/bin/Debug/Hw3.exe differ diff --git a/ProgrammSecondLesson/Hw3/bin/Debug/Hw3.exe.config b/ProgrammSecondLesson/Hw3/bin/Debug/Hw3.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammSecondLesson/Hw3/bin/Debug/Hw3.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw3/bin/Debug/Hw3.pdb b/ProgrammSecondLesson/Hw3/bin/Debug/Hw3.pdb new file mode 100644 index 0000000..d5ebc1b Binary files /dev/null and b/ProgrammSecondLesson/Hw3/bin/Debug/Hw3.pdb differ diff --git a/ProgrammSecondLesson/Hw3/bin/Debug/ProgrammSecondLesson.exe b/ProgrammSecondLesson/Hw3/bin/Debug/ProgrammSecondLesson.exe new file mode 100644 index 0000000..615eb12 Binary files /dev/null and b/ProgrammSecondLesson/Hw3/bin/Debug/ProgrammSecondLesson.exe differ diff --git a/ProgrammSecondLesson/Hw3/bin/Debug/ProgrammSecondLesson.exe.config b/ProgrammSecondLesson/Hw3/bin/Debug/ProgrammSecondLesson.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammSecondLesson/Hw3/bin/Debug/ProgrammSecondLesson.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw3/bin/Debug/ProgrammSecondLesson.pdb b/ProgrammSecondLesson/Hw3/bin/Debug/ProgrammSecondLesson.pdb new file mode 100644 index 0000000..cb87eb3 Binary files /dev/null and b/ProgrammSecondLesson/Hw3/bin/Debug/ProgrammSecondLesson.pdb differ diff --git a/ProgrammSecondLesson/Hw3/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgrammSecondLesson/Hw3/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgrammSecondLesson/Hw3/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgrammSecondLesson/Hw3/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgrammSecondLesson/Hw3/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..f62004c Binary files /dev/null and b/ProgrammSecondLesson/Hw3/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgrammSecondLesson/Hw3/obj/Debug/Hw3.csproj.CopyComplete b/ProgrammSecondLesson/Hw3/obj/Debug/Hw3.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/ProgrammSecondLesson/Hw3/obj/Debug/Hw3.csproj.CoreCompileInputs.cache b/ProgrammSecondLesson/Hw3/obj/Debug/Hw3.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..2312201 --- /dev/null +++ b/ProgrammSecondLesson/Hw3/obj/Debug/Hw3.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +b2fea9f9e788d3d9e8036446403904db4f1915f6 diff --git a/ProgrammSecondLesson/Hw3/obj/Debug/Hw3.csproj.FileListAbsolute.txt b/ProgrammSecondLesson/Hw3/obj/Debug/Hw3.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..3484a26 --- /dev/null +++ b/ProgrammSecondLesson/Hw3/obj/Debug/Hw3.csproj.FileListAbsolute.txt @@ -0,0 +1,11 @@ +D:\ProgrC#\ProgrammSecondLesson\Hw3\bin\Debug\Hw3.exe.config +D:\ProgrC#\ProgrammSecondLesson\Hw3\bin\Debug\Hw3.exe +D:\ProgrC#\ProgrammSecondLesson\Hw3\bin\Debug\Hw3.pdb +D:\ProgrC#\ProgrammSecondLesson\Hw3\obj\Debug\Hw3.csprojAssemblyReference.cache +D:\ProgrC#\ProgrammSecondLesson\Hw3\obj\Debug\Hw3.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammSecondLesson\Hw3\obj\Debug\Hw3.exe +D:\ProgrC#\ProgrammSecondLesson\Hw3\obj\Debug\Hw3.pdb +D:\ProgrC#\ProgrammSecondLesson\Hw3\bin\Debug\ProgrammSecondLesson.exe +D:\ProgrC#\ProgrammSecondLesson\Hw3\bin\Debug\ProgrammSecondLesson.pdb +D:\ProgrC#\ProgrammSecondLesson\Hw3\bin\Debug\ProgrammSecondLesson.exe.config +D:\ProgrC#\ProgrammSecondLesson\Hw3\obj\Debug\Hw3.csproj.CopyComplete diff --git a/ProgrammSecondLesson/Hw3/obj/Debug/Hw3.csprojAssemblyReference.cache b/ProgrammSecondLesson/Hw3/obj/Debug/Hw3.csprojAssemblyReference.cache new file mode 100644 index 0000000..7a1e757 Binary files /dev/null and b/ProgrammSecondLesson/Hw3/obj/Debug/Hw3.csprojAssemblyReference.cache differ diff --git a/ProgrammSecondLesson/Hw3/obj/Debug/Hw3.exe b/ProgrammSecondLesson/Hw3/obj/Debug/Hw3.exe new file mode 100644 index 0000000..b5fa306 Binary files /dev/null and b/ProgrammSecondLesson/Hw3/obj/Debug/Hw3.exe differ diff --git a/ProgrammSecondLesson/Hw3/obj/Debug/Hw3.pdb b/ProgrammSecondLesson/Hw3/obj/Debug/Hw3.pdb new file mode 100644 index 0000000..d5ebc1b Binary files /dev/null and b/ProgrammSecondLesson/Hw3/obj/Debug/Hw3.pdb differ diff --git a/ProgrammSecondLesson/Hw4/App.config b/ProgrammSecondLesson/Hw4/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammSecondLesson/Hw4/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw4/Hw4.csproj b/ProgrammSecondLesson/Hw4/Hw4.csproj new file mode 100644 index 0000000..85ebdbd --- /dev/null +++ b/ProgrammSecondLesson/Hw4/Hw4.csproj @@ -0,0 +1,59 @@ + + + + + Debug + AnyCPU + {AF7CCECB-00A8-447E-92EB-8751A7959F53} + Exe + Hw4 + Hw4 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + {c6d2c6b4-ca97-4228-981e-68ee6a847d9e} + ProgrammSecondLesson + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw4/Program.cs b/ProgrammSecondLesson/Hw4/Program.cs new file mode 100644 index 0000000..f3ab628 --- /dev/null +++ b/ProgrammSecondLesson/Hw4/Program.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hw4 +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Жирнов. Реализовать метод проверки логина и пароля. На вход метода подается логин и пароль. На выходе истина, если прошел авторизацию, и ложь, если не прошел (Логин: root, Password: GeekBrains). Используя метод проверки логина и пароля, написать программу: пользователь вводит логин и пароль, программа пропускает его дальше или не пропускает. С помощью цикла do while ограничить ввод пароля тремя попытками."); + string login = "root"; + string password = "GeekBrains"; + string variant; + int count = 3; + bool success; + count = ProgrammSecondLesson.Program.Authorization(login, password, out variant, count, out success); + Console.WriteLine($"Для выхода из программы нажмите любую клавишу"); + Console.ReadKey(); + } + + #region Метод прохождения авторизации + /*private static int Authorization(string login, string password, out string variant, int count, out bool success) + { + Console.WriteLine("Для того, чтобы пройти авторизацию введите ваши данные"); + do + { + success = true; + Console.WriteLine("Введите логин: "); + variant = Console.ReadLine(); + success = (success) && (variant == login); + Console.WriteLine("Введите пароль: "); + variant = Console.ReadLine(); + success = (success) && (variant == password); + count--; + } + while ((!success) && (count != 0)); + if (success) Console.WriteLine("Авторизация пройдена успешно!"); + else Console.WriteLine("Вы не справились с прохождением авторизцаии, рекомендую попробовать себя в чём-то ином!"); + return count; + }*/ + #endregion + } +} diff --git a/ProgrammSecondLesson/Hw4/Properties/AssemblyInfo.cs b/ProgrammSecondLesson/Hw4/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f5b9bd0 --- /dev/null +++ b/ProgrammSecondLesson/Hw4/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("Hw4")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Hw4")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("af7ccecb-00a8-447e-92eb-8751a7959f53")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgrammSecondLesson/Hw4/bin/Debug/Hw4.exe b/ProgrammSecondLesson/Hw4/bin/Debug/Hw4.exe new file mode 100644 index 0000000..ed93975 Binary files /dev/null and b/ProgrammSecondLesson/Hw4/bin/Debug/Hw4.exe differ diff --git a/ProgrammSecondLesson/Hw4/bin/Debug/Hw4.exe.config b/ProgrammSecondLesson/Hw4/bin/Debug/Hw4.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammSecondLesson/Hw4/bin/Debug/Hw4.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw4/bin/Debug/Hw4.pdb b/ProgrammSecondLesson/Hw4/bin/Debug/Hw4.pdb new file mode 100644 index 0000000..2746ab5 Binary files /dev/null and b/ProgrammSecondLesson/Hw4/bin/Debug/Hw4.pdb differ diff --git a/ProgrammSecondLesson/Hw4/bin/Debug/ProgrammSecondLesson.exe b/ProgrammSecondLesson/Hw4/bin/Debug/ProgrammSecondLesson.exe new file mode 100644 index 0000000..615eb12 Binary files /dev/null and b/ProgrammSecondLesson/Hw4/bin/Debug/ProgrammSecondLesson.exe differ diff --git a/ProgrammSecondLesson/Hw4/bin/Debug/ProgrammSecondLesson.exe.config b/ProgrammSecondLesson/Hw4/bin/Debug/ProgrammSecondLesson.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammSecondLesson/Hw4/bin/Debug/ProgrammSecondLesson.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw4/bin/Debug/ProgrammSecondLesson.pdb b/ProgrammSecondLesson/Hw4/bin/Debug/ProgrammSecondLesson.pdb new file mode 100644 index 0000000..cb87eb3 Binary files /dev/null and b/ProgrammSecondLesson/Hw4/bin/Debug/ProgrammSecondLesson.pdb differ diff --git a/ProgrammSecondLesson/Hw4/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgrammSecondLesson/Hw4/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgrammSecondLesson/Hw4/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgrammSecondLesson/Hw4/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgrammSecondLesson/Hw4/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..47605af Binary files /dev/null and b/ProgrammSecondLesson/Hw4/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgrammSecondLesson/Hw4/obj/Debug/Hw4.csproj.CopyComplete b/ProgrammSecondLesson/Hw4/obj/Debug/Hw4.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/ProgrammSecondLesson/Hw4/obj/Debug/Hw4.csproj.CoreCompileInputs.cache b/ProgrammSecondLesson/Hw4/obj/Debug/Hw4.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..2312201 --- /dev/null +++ b/ProgrammSecondLesson/Hw4/obj/Debug/Hw4.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +b2fea9f9e788d3d9e8036446403904db4f1915f6 diff --git a/ProgrammSecondLesson/Hw4/obj/Debug/Hw4.csproj.FileListAbsolute.txt b/ProgrammSecondLesson/Hw4/obj/Debug/Hw4.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..57e3240 --- /dev/null +++ b/ProgrammSecondLesson/Hw4/obj/Debug/Hw4.csproj.FileListAbsolute.txt @@ -0,0 +1,11 @@ +D:\ProgrC#\ProgrammSecondLesson\Hw4\bin\Debug\Hw4.exe.config +D:\ProgrC#\ProgrammSecondLesson\Hw4\bin\Debug\Hw4.exe +D:\ProgrC#\ProgrammSecondLesson\Hw4\bin\Debug\Hw4.pdb +D:\ProgrC#\ProgrammSecondLesson\Hw4\obj\Debug\Hw4.csprojAssemblyReference.cache +D:\ProgrC#\ProgrammSecondLesson\Hw4\obj\Debug\Hw4.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammSecondLesson\Hw4\obj\Debug\Hw4.exe +D:\ProgrC#\ProgrammSecondLesson\Hw4\obj\Debug\Hw4.pdb +D:\ProgrC#\ProgrammSecondLesson\Hw4\bin\Debug\ProgrammSecondLesson.exe +D:\ProgrC#\ProgrammSecondLesson\Hw4\bin\Debug\ProgrammSecondLesson.pdb +D:\ProgrC#\ProgrammSecondLesson\Hw4\bin\Debug\ProgrammSecondLesson.exe.config +D:\ProgrC#\ProgrammSecondLesson\Hw4\obj\Debug\Hw4.csproj.CopyComplete diff --git a/ProgrammSecondLesson/Hw4/obj/Debug/Hw4.csprojAssemblyReference.cache b/ProgrammSecondLesson/Hw4/obj/Debug/Hw4.csprojAssemblyReference.cache new file mode 100644 index 0000000..41627ca Binary files /dev/null and b/ProgrammSecondLesson/Hw4/obj/Debug/Hw4.csprojAssemblyReference.cache differ diff --git a/ProgrammSecondLesson/Hw4/obj/Debug/Hw4.exe b/ProgrammSecondLesson/Hw4/obj/Debug/Hw4.exe new file mode 100644 index 0000000..ed93975 Binary files /dev/null and b/ProgrammSecondLesson/Hw4/obj/Debug/Hw4.exe differ diff --git a/ProgrammSecondLesson/Hw4/obj/Debug/Hw4.pdb b/ProgrammSecondLesson/Hw4/obj/Debug/Hw4.pdb new file mode 100644 index 0000000..2746ab5 Binary files /dev/null and b/ProgrammSecondLesson/Hw4/obj/Debug/Hw4.pdb differ diff --git a/ProgrammSecondLesson/Hw5/App.config b/ProgrammSecondLesson/Hw5/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammSecondLesson/Hw5/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw5/Hw5.csproj b/ProgrammSecondLesson/Hw5/Hw5.csproj new file mode 100644 index 0000000..916eb94 --- /dev/null +++ b/ProgrammSecondLesson/Hw5/Hw5.csproj @@ -0,0 +1,59 @@ + + + + + Debug + AnyCPU + {81571BF7-0427-4B44-9861-3751FCEF0B58} + Exe + Hw5 + Hw5 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + {c6d2c6b4-ca97-4228-981e-68ee6a847d9e} + ProgrammSecondLesson + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw5/Program.cs b/ProgrammSecondLesson/Hw5/Program.cs new file mode 100644 index 0000000..ddac6af --- /dev/null +++ b/ProgrammSecondLesson/Hw5/Program.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hw5 +{ + class Program + { + static void Main(string[] args) + { + #region Программа вычисления рекомендаций по весу + Console.WriteLine("Жирнов. а) Написать программу, которая запрашивает массу и рост человека, вычисляет его индекс массы и сообщает, нужно ли человеку похудеть, набрать вес или всё в норме. б) * Рассчитать, на сколько кг похудеть или сколько кг набрать для нормализации веса."); + Console.WriteLine("Для того, чтобы узнать стоит ли посидеть на диете"); + Console.WriteLine("Введите вес в кг: "); + double weight = int.Parse(Console.ReadLine()); + Console.WriteLine("Введите рост в см: "); + double height = int.Parse(Console.ReadLine()); + //double index = (weight * 10000 / (height * height)); + //double reccomendWeight= ((18.5 * height * height / 10000 - weight)); + ProgrammSecondLesson.Program.recommedWeight(weight, height); + ProgrammSecondLesson.Program.CloseProgrammKey(); + #endregion + } + + #region Метод подсчёта рекомендаций по весу + private static void recommedWeight(double weight, double height) + { + if ((weight * 10000 / (height * height)) < 18.5) Console.WriteLine($"Ваш индекс массы тела: {(weight * 10000 / (height * height)):f2}. Рекомендую кушать чаще. Вам стоит набрать {((18.5 * height * height / 10000 - weight)):f2} килограмм"); + else if ((weight * 10000 / (height * height)) > 25) Console.WriteLine($"Ваш индекс массы тела: {(weight * 10000 / (height * height)):f2}. Рекомендую посидеть на диете. Вам стоит похудеть на {(-25 * height * height / 10000 + weight):f2} килограмм"); + else Console.WriteLine($"Ваш индекс массы тела: {(weight * 10000 / (height * height)):f2}. Вам не нужно ничего менять, вы итак молодец! "); + } + #endregion + } +} diff --git a/ProgrammSecondLesson/Hw5/Properties/AssemblyInfo.cs b/ProgrammSecondLesson/Hw5/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..ffa893f --- /dev/null +++ b/ProgrammSecondLesson/Hw5/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("Hw5")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Hw5")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("81571bf7-0427-4b44-9861-3751fcef0b58")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgrammSecondLesson/Hw5/bin/Debug/Hw5.exe b/ProgrammSecondLesson/Hw5/bin/Debug/Hw5.exe new file mode 100644 index 0000000..d1ed828 Binary files /dev/null and b/ProgrammSecondLesson/Hw5/bin/Debug/Hw5.exe differ diff --git a/ProgrammSecondLesson/Hw5/bin/Debug/Hw5.exe.config b/ProgrammSecondLesson/Hw5/bin/Debug/Hw5.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammSecondLesson/Hw5/bin/Debug/Hw5.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw5/bin/Debug/Hw5.pdb b/ProgrammSecondLesson/Hw5/bin/Debug/Hw5.pdb new file mode 100644 index 0000000..6f426e8 Binary files /dev/null and b/ProgrammSecondLesson/Hw5/bin/Debug/Hw5.pdb differ diff --git a/ProgrammSecondLesson/Hw5/bin/Debug/ProgrammSecondLesson.exe b/ProgrammSecondLesson/Hw5/bin/Debug/ProgrammSecondLesson.exe new file mode 100644 index 0000000..cac7e36 Binary files /dev/null and b/ProgrammSecondLesson/Hw5/bin/Debug/ProgrammSecondLesson.exe differ diff --git a/ProgrammSecondLesson/Hw5/bin/Debug/ProgrammSecondLesson.exe.config b/ProgrammSecondLesson/Hw5/bin/Debug/ProgrammSecondLesson.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammSecondLesson/Hw5/bin/Debug/ProgrammSecondLesson.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw5/bin/Debug/ProgrammSecondLesson.pdb b/ProgrammSecondLesson/Hw5/bin/Debug/ProgrammSecondLesson.pdb new file mode 100644 index 0000000..a744e39 Binary files /dev/null and b/ProgrammSecondLesson/Hw5/bin/Debug/ProgrammSecondLesson.pdb differ diff --git a/ProgrammSecondLesson/Hw5/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgrammSecondLesson/Hw5/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgrammSecondLesson/Hw5/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgrammSecondLesson/Hw5/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgrammSecondLesson/Hw5/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..6348814 Binary files /dev/null and b/ProgrammSecondLesson/Hw5/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgrammSecondLesson/Hw5/obj/Debug/Hw5.csproj.CopyComplete b/ProgrammSecondLesson/Hw5/obj/Debug/Hw5.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/ProgrammSecondLesson/Hw5/obj/Debug/Hw5.csproj.CoreCompileInputs.cache b/ProgrammSecondLesson/Hw5/obj/Debug/Hw5.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..2312201 --- /dev/null +++ b/ProgrammSecondLesson/Hw5/obj/Debug/Hw5.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +b2fea9f9e788d3d9e8036446403904db4f1915f6 diff --git a/ProgrammSecondLesson/Hw5/obj/Debug/Hw5.csproj.FileListAbsolute.txt b/ProgrammSecondLesson/Hw5/obj/Debug/Hw5.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..a3ac15a --- /dev/null +++ b/ProgrammSecondLesson/Hw5/obj/Debug/Hw5.csproj.FileListAbsolute.txt @@ -0,0 +1,11 @@ +D:\ProgrC#\ProgrammSecondLesson\Hw5\obj\Debug\Hw5.csprojAssemblyReference.cache +D:\ProgrC#\ProgrammSecondLesson\Hw5\obj\Debug\Hw5.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammSecondLesson\Hw5\bin\Debug\Hw5.exe.config +D:\ProgrC#\ProgrammSecondLesson\Hw5\bin\Debug\Hw5.exe +D:\ProgrC#\ProgrammSecondLesson\Hw5\bin\Debug\Hw5.pdb +D:\ProgrC#\ProgrammSecondLesson\Hw5\obj\Debug\Hw5.exe +D:\ProgrC#\ProgrammSecondLesson\Hw5\obj\Debug\Hw5.pdb +D:\ProgrC#\ProgrammSecondLesson\Hw5\bin\Debug\ProgrammSecondLesson.exe +D:\ProgrC#\ProgrammSecondLesson\Hw5\bin\Debug\ProgrammSecondLesson.pdb +D:\ProgrC#\ProgrammSecondLesson\Hw5\bin\Debug\ProgrammSecondLesson.exe.config +D:\ProgrC#\ProgrammSecondLesson\Hw5\obj\Debug\Hw5.csproj.CopyComplete diff --git a/ProgrammSecondLesson/Hw5/obj/Debug/Hw5.csprojAssemblyReference.cache b/ProgrammSecondLesson/Hw5/obj/Debug/Hw5.csprojAssemblyReference.cache new file mode 100644 index 0000000..49e39bd Binary files /dev/null and b/ProgrammSecondLesson/Hw5/obj/Debug/Hw5.csprojAssemblyReference.cache differ diff --git a/ProgrammSecondLesson/Hw5/obj/Debug/Hw5.exe b/ProgrammSecondLesson/Hw5/obj/Debug/Hw5.exe new file mode 100644 index 0000000..d1ed828 Binary files /dev/null and b/ProgrammSecondLesson/Hw5/obj/Debug/Hw5.exe differ diff --git a/ProgrammSecondLesson/Hw5/obj/Debug/Hw5.pdb b/ProgrammSecondLesson/Hw5/obj/Debug/Hw5.pdb new file mode 100644 index 0000000..6f426e8 Binary files /dev/null and b/ProgrammSecondLesson/Hw5/obj/Debug/Hw5.pdb differ diff --git a/ProgrammSecondLesson/Hw6/App.config b/ProgrammSecondLesson/Hw6/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammSecondLesson/Hw6/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw6/Hw6.csproj b/ProgrammSecondLesson/Hw6/Hw6.csproj new file mode 100644 index 0000000..fbd8407 --- /dev/null +++ b/ProgrammSecondLesson/Hw6/Hw6.csproj @@ -0,0 +1,59 @@ + + + + + Debug + AnyCPU + {EE647AE8-AF1C-4496-A0FA-F2EC82E23463} + Exe + Hw6 + Hw6 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + {c6d2c6b4-ca97-4228-981e-68ee6a847d9e} + ProgrammSecondLesson + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw6/Program.cs b/ProgrammSecondLesson/Hw6/Program.cs new file mode 100644 index 0000000..9f426a8 --- /dev/null +++ b/ProgrammSecondLesson/Hw6/Program.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hw6 +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Жирнов. Написать программу подсчета количества «хороших» чисел в диапазоне от 1 до 1 000 000 000. «Хорошим» называется число, которое делится на сумму своих цифр. Реализовать подсчёт времени выполнения программы, используя структуру DateTime."); + #region Вариант 1 цикл while + DateTime date = DateTime.Now; + Console.WriteLine("Вариант 1 цикл while"); + int count = 1; + int countGood = 0; + while (count <= 1000000000) + { + if (count % ((count % 10) + ((count / 10) % 10) + ((count / 100) % 10) + ((count /1000) % 10) + ((count / 10000) % 10) + ((count / 100000) % 10)+ ((count / 1000000) % 10) + ((count / 10000000) % 10) + ((count / 100000000) % 10) + ((count / 1000000000) % 10)) == 0) countGood++; + count++; + } + Console.WriteLine($"Всего хороших чисел: {countGood}"); + Console.WriteLine($"Затрачено времени на вычисления: {DateTime.Now - date}"); + #endregion + + #region Вариант 2 цикл for + date = DateTime.Now; + Console.WriteLine("Вариант 2 цикл for"); + count = 1; + countGood = 0; + for (count = 1; count<= 1000000000; count++) + { + if (count % ((count % 10) + ((count / 10) % 10) + ((count / 100) % 10) + ((count / 1000) % 10) + ((count / 10000) % 10) + ((count / 100000) % 10) + ((count / 1000000) % 10) + ((count / 10000000) % 10) + ((count / 100000000) % 10) + ((count / 1000000000) % 10)) == 0) countGood++; + } + Console.WriteLine($"Всего хороших чисел: {countGood}"); + Console.WriteLine($"Затрачено времени на вычисления: {DateTime.Now - date}"); + #endregion + + #region Вариант 3 цикл while в цикле for + date = DateTime.Now; + Console.WriteLine("Вариант 3 цикл while в цикле for с вариантом лёгкого исправления условий задачи"); + int goodCount = 0; + int min = 1; + int max = 1000000000; + int sumOst; + int ost; + + for (int counter = min; counter <= max; counter++) + { + sumOst = 0; + ost = counter; + while (ost != 0) + { + sumOst += ost % 10; + ost /= 10; + } + if (counter % sumOst == 0) goodCount++; + } + Console.WriteLine($"Всего хороших чисел: {goodCount}"); + Console.WriteLine($"Затрачено времени на вычисления: {DateTime.Now - date}"); + #endregion + + ProgrammSecondLesson.Program.CloseProgrammKey(); + } + } +} diff --git a/ProgrammSecondLesson/Hw6/Properties/AssemblyInfo.cs b/ProgrammSecondLesson/Hw6/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..97023a6 --- /dev/null +++ b/ProgrammSecondLesson/Hw6/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("Hw6")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Hw6")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("ee647ae8-af1c-4496-a0fa-f2ec82e23463")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgrammSecondLesson/Hw6/bin/Debug/Hw6.exe b/ProgrammSecondLesson/Hw6/bin/Debug/Hw6.exe new file mode 100644 index 0000000..f1c9904 Binary files /dev/null and b/ProgrammSecondLesson/Hw6/bin/Debug/Hw6.exe differ diff --git a/ProgrammSecondLesson/Hw6/bin/Debug/Hw6.exe.config b/ProgrammSecondLesson/Hw6/bin/Debug/Hw6.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammSecondLesson/Hw6/bin/Debug/Hw6.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw6/bin/Debug/Hw6.pdb b/ProgrammSecondLesson/Hw6/bin/Debug/Hw6.pdb new file mode 100644 index 0000000..7f3b325 Binary files /dev/null and b/ProgrammSecondLesson/Hw6/bin/Debug/Hw6.pdb differ diff --git a/ProgrammSecondLesson/Hw6/bin/Debug/ProgrammSecondLesson.exe b/ProgrammSecondLesson/Hw6/bin/Debug/ProgrammSecondLesson.exe new file mode 100644 index 0000000..cac7e36 Binary files /dev/null and b/ProgrammSecondLesson/Hw6/bin/Debug/ProgrammSecondLesson.exe differ diff --git a/ProgrammSecondLesson/Hw6/bin/Debug/ProgrammSecondLesson.exe.config b/ProgrammSecondLesson/Hw6/bin/Debug/ProgrammSecondLesson.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammSecondLesson/Hw6/bin/Debug/ProgrammSecondLesson.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw6/bin/Debug/ProgrammSecondLesson.pdb b/ProgrammSecondLesson/Hw6/bin/Debug/ProgrammSecondLesson.pdb new file mode 100644 index 0000000..a744e39 Binary files /dev/null and b/ProgrammSecondLesson/Hw6/bin/Debug/ProgrammSecondLesson.pdb differ diff --git a/ProgrammSecondLesson/Hw6/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgrammSecondLesson/Hw6/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgrammSecondLesson/Hw6/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgrammSecondLesson/Hw6/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgrammSecondLesson/Hw6/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..b13098c Binary files /dev/null and b/ProgrammSecondLesson/Hw6/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgrammSecondLesson/Hw6/obj/Debug/Hw6.csproj.CopyComplete b/ProgrammSecondLesson/Hw6/obj/Debug/Hw6.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/ProgrammSecondLesson/Hw6/obj/Debug/Hw6.csproj.CoreCompileInputs.cache b/ProgrammSecondLesson/Hw6/obj/Debug/Hw6.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..2312201 --- /dev/null +++ b/ProgrammSecondLesson/Hw6/obj/Debug/Hw6.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +b2fea9f9e788d3d9e8036446403904db4f1915f6 diff --git a/ProgrammSecondLesson/Hw6/obj/Debug/Hw6.csproj.FileListAbsolute.txt b/ProgrammSecondLesson/Hw6/obj/Debug/Hw6.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..19d12a1 --- /dev/null +++ b/ProgrammSecondLesson/Hw6/obj/Debug/Hw6.csproj.FileListAbsolute.txt @@ -0,0 +1,10 @@ +D:\ProgrC#\ProgrammSecondLesson\Hw6\bin\Debug\Hw6.exe.config +D:\ProgrC#\ProgrammSecondLesson\Hw6\bin\Debug\Hw6.exe +D:\ProgrC#\ProgrammSecondLesson\Hw6\bin\Debug\Hw6.pdb +D:\ProgrC#\ProgrammSecondLesson\Hw6\obj\Debug\Hw6.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammSecondLesson\Hw6\obj\Debug\Hw6.exe +D:\ProgrC#\ProgrammSecondLesson\Hw6\obj\Debug\Hw6.pdb +D:\ProgrC#\ProgrammSecondLesson\Hw6\bin\Debug\ProgrammSecondLesson.exe +D:\ProgrC#\ProgrammSecondLesson\Hw6\bin\Debug\ProgrammSecondLesson.pdb +D:\ProgrC#\ProgrammSecondLesson\Hw6\bin\Debug\ProgrammSecondLesson.exe.config +D:\ProgrC#\ProgrammSecondLesson\Hw6\obj\Debug\Hw6.csproj.CopyComplete diff --git a/ProgrammSecondLesson/Hw6/obj/Debug/Hw6.exe b/ProgrammSecondLesson/Hw6/obj/Debug/Hw6.exe new file mode 100644 index 0000000..f1c9904 Binary files /dev/null and b/ProgrammSecondLesson/Hw6/obj/Debug/Hw6.exe differ diff --git a/ProgrammSecondLesson/Hw6/obj/Debug/Hw6.pdb b/ProgrammSecondLesson/Hw6/obj/Debug/Hw6.pdb new file mode 100644 index 0000000..7f3b325 Binary files /dev/null and b/ProgrammSecondLesson/Hw6/obj/Debug/Hw6.pdb differ diff --git a/ProgrammSecondLesson/Hw7/App.config b/ProgrammSecondLesson/Hw7/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammSecondLesson/Hw7/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw7/Hw7.csproj b/ProgrammSecondLesson/Hw7/Hw7.csproj new file mode 100644 index 0000000..719aeba --- /dev/null +++ b/ProgrammSecondLesson/Hw7/Hw7.csproj @@ -0,0 +1,59 @@ + + + + + Debug + AnyCPU + {28424FFA-4DD0-4A90-BEDB-1BFB0AC0AC0E} + Exe + Hw7 + Hw7 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + {c6d2c6b4-ca97-4228-981e-68ee6a847d9e} + ProgrammSecondLesson + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw7/Program.cs b/ProgrammSecondLesson/Hw7/Program.cs new file mode 100644 index 0000000..d758552 --- /dev/null +++ b/ProgrammSecondLesson/Hw7/Program.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hw7 +{ + class Program + { + #region Рекурсивный метод вывода чисел от a до b + /*static void Numbers(int a, int b) + { + if (b > a) + { + Console.WriteLine($"Число {a}"); + Numbers(a + 1, b); + } + }*/ + #endregion + #region Рекурсивный метод подсчёта суммы чисел от a до b + /* static int Su(int a, int b) + { + { + // Базовый случай + if (b == a) + { + return b; + } + else return Su(a, b - 1) + b; + } + }*/ + #endregion + + + static void Main(string[] args) + { + #region Программа для вывода чисел от a до b и подсчёта их суммы + Console.WriteLine("Жирнов. a) Разработать рекурсивный метод, который выводит на экран числа от a строго до b(a + + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw7/bin/Debug/Hw7.pdb b/ProgrammSecondLesson/Hw7/bin/Debug/Hw7.pdb new file mode 100644 index 0000000..5cf209f Binary files /dev/null and b/ProgrammSecondLesson/Hw7/bin/Debug/Hw7.pdb differ diff --git a/ProgrammSecondLesson/Hw7/bin/Debug/ProgrammSecondLesson.exe b/ProgrammSecondLesson/Hw7/bin/Debug/ProgrammSecondLesson.exe new file mode 100644 index 0000000..cac7e36 Binary files /dev/null and b/ProgrammSecondLesson/Hw7/bin/Debug/ProgrammSecondLesson.exe differ diff --git a/ProgrammSecondLesson/Hw7/bin/Debug/ProgrammSecondLesson.exe.config b/ProgrammSecondLesson/Hw7/bin/Debug/ProgrammSecondLesson.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammSecondLesson/Hw7/bin/Debug/ProgrammSecondLesson.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/Hw7/bin/Debug/ProgrammSecondLesson.pdb b/ProgrammSecondLesson/Hw7/bin/Debug/ProgrammSecondLesson.pdb new file mode 100644 index 0000000..a744e39 Binary files /dev/null and b/ProgrammSecondLesson/Hw7/bin/Debug/ProgrammSecondLesson.pdb differ diff --git a/ProgrammSecondLesson/Hw7/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgrammSecondLesson/Hw7/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgrammSecondLesson/Hw7/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgrammSecondLesson/Hw7/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgrammSecondLesson/Hw7/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..4249df4 Binary files /dev/null and b/ProgrammSecondLesson/Hw7/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgrammSecondLesson/Hw7/obj/Debug/Hw7.csproj.CopyComplete b/ProgrammSecondLesson/Hw7/obj/Debug/Hw7.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/ProgrammSecondLesson/Hw7/obj/Debug/Hw7.csproj.CoreCompileInputs.cache b/ProgrammSecondLesson/Hw7/obj/Debug/Hw7.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..2312201 --- /dev/null +++ b/ProgrammSecondLesson/Hw7/obj/Debug/Hw7.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +b2fea9f9e788d3d9e8036446403904db4f1915f6 diff --git a/ProgrammSecondLesson/Hw7/obj/Debug/Hw7.csproj.FileListAbsolute.txt b/ProgrammSecondLesson/Hw7/obj/Debug/Hw7.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..14c985e --- /dev/null +++ b/ProgrammSecondLesson/Hw7/obj/Debug/Hw7.csproj.FileListAbsolute.txt @@ -0,0 +1,11 @@ +D:\ProgrC#\ProgrammSecondLesson\Hw7\bin\Debug\Hw7.exe.config +D:\ProgrC#\ProgrammSecondLesson\Hw7\bin\Debug\Hw7.exe +D:\ProgrC#\ProgrammSecondLesson\Hw7\bin\Debug\Hw7.pdb +D:\ProgrC#\ProgrammSecondLesson\Hw7\obj\Debug\Hw7.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammSecondLesson\Hw7\obj\Debug\Hw7.exe +D:\ProgrC#\ProgrammSecondLesson\Hw7\obj\Debug\Hw7.pdb +D:\ProgrC#\ProgrammSecondLesson\Hw7\obj\Debug\Hw7.csprojAssemblyReference.cache +D:\ProgrC#\ProgrammSecondLesson\Hw7\bin\Debug\ProgrammSecondLesson.exe +D:\ProgrC#\ProgrammSecondLesson\Hw7\bin\Debug\ProgrammSecondLesson.pdb +D:\ProgrC#\ProgrammSecondLesson\Hw7\bin\Debug\ProgrammSecondLesson.exe.config +D:\ProgrC#\ProgrammSecondLesson\Hw7\obj\Debug\Hw7.csproj.CopyComplete diff --git a/ProgrammSecondLesson/Hw7/obj/Debug/Hw7.csprojAssemblyReference.cache b/ProgrammSecondLesson/Hw7/obj/Debug/Hw7.csprojAssemblyReference.cache new file mode 100644 index 0000000..d6f8938 Binary files /dev/null and b/ProgrammSecondLesson/Hw7/obj/Debug/Hw7.csprojAssemblyReference.cache differ diff --git a/ProgrammSecondLesson/Hw7/obj/Debug/Hw7.exe b/ProgrammSecondLesson/Hw7/obj/Debug/Hw7.exe new file mode 100644 index 0000000..67e700a Binary files /dev/null and b/ProgrammSecondLesson/Hw7/obj/Debug/Hw7.exe differ diff --git a/ProgrammSecondLesson/Hw7/obj/Debug/Hw7.pdb b/ProgrammSecondLesson/Hw7/obj/Debug/Hw7.pdb new file mode 100644 index 0000000..5cf209f Binary files /dev/null and b/ProgrammSecondLesson/Hw7/obj/Debug/Hw7.pdb differ diff --git a/ProgrammSecondLesson/ProgrammSecondLesson.sln b/ProgrammSecondLesson/ProgrammSecondLesson.sln new file mode 100644 index 0000000..8f16cfa --- /dev/null +++ b/ProgrammSecondLesson/ProgrammSecondLesson.sln @@ -0,0 +1,67 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30413.136 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProgrammSecondLesson", "ProgrammSecondLesson\ProgrammSecondLesson.csproj", "{C6D2C6B4-CA97-4228-981E-68EE6A847D9E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hw1", "Hw1\Hw1.csproj", "{C57D9A4D-4DB1-4F57-994B-7333E3D0ADA0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hw2", "Hw2\Hw2.csproj", "{55BD4F78-AB6F-49E0-8532-9EE082EC453E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hw3", "Hw3\Hw3.csproj", "{9138DBBB-CD77-46F7-BE99-722AECE750EE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hw4", "Hw4\Hw4.csproj", "{AF7CCECB-00A8-447E-92EB-8751A7959F53}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hw5", "Hw5\Hw5.csproj", "{81571BF7-0427-4B44-9861-3751FCEF0B58}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hw6", "Hw6\Hw6.csproj", "{EE647AE8-AF1C-4496-A0FA-F2EC82E23463}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hw7", "Hw7\Hw7.csproj", "{28424FFA-4DD0-4A90-BEDB-1BFB0AC0AC0E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C6D2C6B4-CA97-4228-981E-68EE6A847D9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C6D2C6B4-CA97-4228-981E-68EE6A847D9E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C6D2C6B4-CA97-4228-981E-68EE6A847D9E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C6D2C6B4-CA97-4228-981E-68EE6A847D9E}.Release|Any CPU.Build.0 = Release|Any CPU + {C57D9A4D-4DB1-4F57-994B-7333E3D0ADA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C57D9A4D-4DB1-4F57-994B-7333E3D0ADA0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C57D9A4D-4DB1-4F57-994B-7333E3D0ADA0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C57D9A4D-4DB1-4F57-994B-7333E3D0ADA0}.Release|Any CPU.Build.0 = Release|Any CPU + {55BD4F78-AB6F-49E0-8532-9EE082EC453E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {55BD4F78-AB6F-49E0-8532-9EE082EC453E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {55BD4F78-AB6F-49E0-8532-9EE082EC453E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {55BD4F78-AB6F-49E0-8532-9EE082EC453E}.Release|Any CPU.Build.0 = Release|Any CPU + {9138DBBB-CD77-46F7-BE99-722AECE750EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9138DBBB-CD77-46F7-BE99-722AECE750EE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9138DBBB-CD77-46F7-BE99-722AECE750EE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9138DBBB-CD77-46F7-BE99-722AECE750EE}.Release|Any CPU.Build.0 = Release|Any CPU + {AF7CCECB-00A8-447E-92EB-8751A7959F53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AF7CCECB-00A8-447E-92EB-8751A7959F53}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AF7CCECB-00A8-447E-92EB-8751A7959F53}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AF7CCECB-00A8-447E-92EB-8751A7959F53}.Release|Any CPU.Build.0 = Release|Any CPU + {81571BF7-0427-4B44-9861-3751FCEF0B58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {81571BF7-0427-4B44-9861-3751FCEF0B58}.Debug|Any CPU.Build.0 = Debug|Any CPU + {81571BF7-0427-4B44-9861-3751FCEF0B58}.Release|Any CPU.ActiveCfg = Release|Any CPU + {81571BF7-0427-4B44-9861-3751FCEF0B58}.Release|Any CPU.Build.0 = Release|Any CPU + {EE647AE8-AF1C-4496-A0FA-F2EC82E23463}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EE647AE8-AF1C-4496-A0FA-F2EC82E23463}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EE647AE8-AF1C-4496-A0FA-F2EC82E23463}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EE647AE8-AF1C-4496-A0FA-F2EC82E23463}.Release|Any CPU.Build.0 = Release|Any CPU + {28424FFA-4DD0-4A90-BEDB-1BFB0AC0AC0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28424FFA-4DD0-4A90-BEDB-1BFB0AC0AC0E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28424FFA-4DD0-4A90-BEDB-1BFB0AC0AC0E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28424FFA-4DD0-4A90-BEDB-1BFB0AC0AC0E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {56451525-AF71-4A71-978D-A40FF28E3BED} + EndGlobalSection +EndGlobal diff --git a/ProgrammSecondLesson/ProgrammSecondLesson/App.config b/ProgrammSecondLesson/ProgrammSecondLesson/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammSecondLesson/ProgrammSecondLesson/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/ProgrammSecondLesson/Program.cs b/ProgrammSecondLesson/ProgrammSecondLesson/Program.cs new file mode 100644 index 0000000..109df91 --- /dev/null +++ b/ProgrammSecondLesson/ProgrammSecondLesson/Program.cs @@ -0,0 +1,119 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProgrammSecondLesson +{ + public class Program + { + //Библиотека методов к уроку 2 + #region Рекурсивный метод вывода чисел от a до b + public static void Numbers(int a, int b) + { + if (b > a) + { + Console.WriteLine($"Число {a}"); + Numbers(a + 1, b); + } + } + #endregion + #region Рекурсивный метод подсчёта суммы чисел от a до b + public static int Su(int a, int b) + { + { + // Базовый случай + if (b == a) + { + return b; + } + else return Su(a, b - 1) + b; + } + } + #endregion + #region Метод подсчёта рекомендаций по весу + public static void recommedWeight(double weight, double height) + { + if ((weight * 10000 / (height * height)) < 18.5) Console.WriteLine($"Ваш индекс массы тела: {(weight * 10000 / (height * height)):f2}. Рекомендую кушать чаще. Вам стоит набрать {((18.5 * height * height / 10000 - weight)):f2} килограмм."); + else if ((weight * 10000 / (height * height)) > 25) Console.WriteLine($"Ваш индекс массы тела: {(weight * 10000 / (height * height)):f2}. Рекомендую посидеть на диете. Вам стоит похудеть на {(-25 * height * height / 10000 + weight):f2} килограмм."); + else Console.WriteLine($"Ваш индекс массы тела: {(weight * 10000 / (height * height)):f2}. Вам не нужно ничего менять, вы итак молодец! "); + } + #endregion + #region Метод прохождения авторизации + public static int Authorization(string login, string password, out string variant, int count, out bool success) + { + Console.WriteLine("Для того, чтобы пройти авторизацию введите ваши данные"); + do + { + success = true; + Console.WriteLine("Введите логин: "); + variant = Console.ReadLine(); + success = (success) && (variant == login); + Console.WriteLine("Введите пароль: "); + variant = Console.ReadLine(); + success = (success) && (variant == password); + count--; + } + while ((!success) && (count != 0)); + if (success) Console.WriteLine("Авторизация пройдена успешно!"); + else Console.WriteLine("Вы не справились с прохождением авторизцаии, рекомендую попробовать себя в чём-то ином!"); + return count; + } + #endregion + #region Метод вычисления суммы нечётных положительных чисел + public static int SumNaturalOdd(ref int sum) + { + int number; + do + { + Console.WriteLine("Введите число: "); + number = Convert.ToInt32(Console.ReadLine()); + if ((number % 2) == 1) sum = sum + number; + } + while (number != 0); + return number; + } + #endregion + #region Метод вычисления колчичества цифр числа + public static void CountNumber() + { + Console.WriteLine("Для того, чтобы узнать количество цифр введите число:"); + int number = Convert.ToInt32(Console.ReadLine()); + int Count = 0; + while (number != 0) + { + number = number / 10; + Count++; + } + Console.WriteLine($"В заданном числе " + Count + " цифр."); + } + #endregion + #region Метод поиска минимального из трёх чисел + public static void Min3() + { + Console.WriteLine("Для того, чтобы найти наименьшее из трёх чисел:"); + Console.WriteLine("Введите первое число "); + double number1 = Convert.ToDouble(Console.ReadLine()); + Console.WriteLine("Введите второе число "); + double number2 = Convert.ToDouble(Console.ReadLine()); + Console.WriteLine("Введите третье число "); + double number3 = Convert.ToDouble(Console.ReadLine()); + if ((number1 < number2) && (number2 < number3)) Console.WriteLine($"Наименьшее число: " + number1); + else if (number2 < number3) Console.WriteLine($"Наименьшее число: " + number2); + else Console.WriteLine($"Наименьшее число: " + number3); + } + #endregion + #region Метод закрытия программы по кнопке + public static void CloseProgrammKey() + { + Console.SetCursorPosition(Console.WindowWidth / 2 - "Для выхода из программы нажмите любую клавишу".Length / 2, Console.WindowHeight / 2 + 1); + Console.WriteLine($"Для выхода из программы нажмите любую клавишу"); + Console.ReadKey(); + } + #endregion + static void Main(string[] args) + { + } + } +} diff --git a/ProgrammSecondLesson/ProgrammSecondLesson/ProgrammSecondLesson.csproj b/ProgrammSecondLesson/ProgrammSecondLesson/ProgrammSecondLesson.csproj new file mode 100644 index 0000000..917bf5e --- /dev/null +++ b/ProgrammSecondLesson/ProgrammSecondLesson/ProgrammSecondLesson.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {C6D2C6B4-CA97-4228-981E-68EE6A847D9E} + Exe + ProgrammSecondLesson + ProgrammSecondLesson + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/ProgrammSecondLesson/Properties/AssemblyInfo.cs b/ProgrammSecondLesson/ProgrammSecondLesson/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..3645c43 --- /dev/null +++ b/ProgrammSecondLesson/ProgrammSecondLesson/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("ProgrammSecondLesson")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ProgrammSecondLesson")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("c6d2c6b4-ca97-4228-981e-68ee6a847d9e")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgrammSecondLesson/ProgrammSecondLesson/bin/Debug/ProgrammSecondLesson.exe b/ProgrammSecondLesson/ProgrammSecondLesson/bin/Debug/ProgrammSecondLesson.exe new file mode 100644 index 0000000..cac7e36 Binary files /dev/null and b/ProgrammSecondLesson/ProgrammSecondLesson/bin/Debug/ProgrammSecondLesson.exe differ diff --git a/ProgrammSecondLesson/ProgrammSecondLesson/bin/Debug/ProgrammSecondLesson.exe.config b/ProgrammSecondLesson/ProgrammSecondLesson/bin/Debug/ProgrammSecondLesson.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammSecondLesson/ProgrammSecondLesson/bin/Debug/ProgrammSecondLesson.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammSecondLesson/ProgrammSecondLesson/bin/Debug/ProgrammSecondLesson.pdb b/ProgrammSecondLesson/ProgrammSecondLesson/bin/Debug/ProgrammSecondLesson.pdb new file mode 100644 index 0000000..a744e39 Binary files /dev/null and b/ProgrammSecondLesson/ProgrammSecondLesson/bin/Debug/ProgrammSecondLesson.pdb differ diff --git a/ProgrammSecondLesson/ProgrammSecondLesson/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgrammSecondLesson/ProgrammSecondLesson/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgrammSecondLesson/ProgrammSecondLesson/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgrammSecondLesson/ProgrammSecondLesson/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgrammSecondLesson/ProgrammSecondLesson/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..143cb40 Binary files /dev/null and b/ProgrammSecondLesson/ProgrammSecondLesson/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgrammSecondLesson/ProgrammSecondLesson/obj/Debug/ProgrammSecondLesson.csproj.CoreCompileInputs.cache b/ProgrammSecondLesson/ProgrammSecondLesson/obj/Debug/ProgrammSecondLesson.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0c63285 --- /dev/null +++ b/ProgrammSecondLesson/ProgrammSecondLesson/obj/Debug/ProgrammSecondLesson.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +2f1b5aa9ca9324e732c8dc8ad98b9a6b4836d80a diff --git a/ProgrammSecondLesson/ProgrammSecondLesson/obj/Debug/ProgrammSecondLesson.csproj.FileListAbsolute.txt b/ProgrammSecondLesson/ProgrammSecondLesson/obj/Debug/ProgrammSecondLesson.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..0dc2803 --- /dev/null +++ b/ProgrammSecondLesson/ProgrammSecondLesson/obj/Debug/ProgrammSecondLesson.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +D:\ProgrC#\ProgrammSecondLesson\ProgrammSecondLesson\bin\Debug\ProgrammSecondLesson.exe.config +D:\ProgrC#\ProgrammSecondLesson\ProgrammSecondLesson\bin\Debug\ProgrammSecondLesson.exe +D:\ProgrC#\ProgrammSecondLesson\ProgrammSecondLesson\bin\Debug\ProgrammSecondLesson.pdb +D:\ProgrC#\ProgrammSecondLesson\ProgrammSecondLesson\obj\Debug\ProgrammSecondLesson.csprojAssemblyReference.cache +D:\ProgrC#\ProgrammSecondLesson\ProgrammSecondLesson\obj\Debug\ProgrammSecondLesson.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammSecondLesson\ProgrammSecondLesson\obj\Debug\ProgrammSecondLesson.exe +D:\ProgrC#\ProgrammSecondLesson\ProgrammSecondLesson\obj\Debug\ProgrammSecondLesson.pdb diff --git a/ProgrammSecondLesson/ProgrammSecondLesson/obj/Debug/ProgrammSecondLesson.csprojAssemblyReference.cache b/ProgrammSecondLesson/ProgrammSecondLesson/obj/Debug/ProgrammSecondLesson.csprojAssemblyReference.cache new file mode 100644 index 0000000..aeb41d6 Binary files /dev/null and b/ProgrammSecondLesson/ProgrammSecondLesson/obj/Debug/ProgrammSecondLesson.csprojAssemblyReference.cache differ diff --git a/ProgrammSecondLesson/ProgrammSecondLesson/obj/Debug/ProgrammSecondLesson.exe b/ProgrammSecondLesson/ProgrammSecondLesson/obj/Debug/ProgrammSecondLesson.exe new file mode 100644 index 0000000..cac7e36 Binary files /dev/null and b/ProgrammSecondLesson/ProgrammSecondLesson/obj/Debug/ProgrammSecondLesson.exe differ diff --git a/ProgrammSecondLesson/ProgrammSecondLesson/obj/Debug/ProgrammSecondLesson.pdb b/ProgrammSecondLesson/ProgrammSecondLesson/obj/Debug/ProgrammSecondLesson.pdb new file mode 100644 index 0000000..a744e39 Binary files /dev/null and b/ProgrammSecondLesson/ProgrammSecondLesson/obj/Debug/ProgrammSecondLesson.pdb differ diff --git a/ProgrammThirdLesson/.vs/ProgrammThirdLesson/v16/.suo b/ProgrammThirdLesson/.vs/ProgrammThirdLesson/v16/.suo new file mode 100644 index 0000000..ea15a05 Binary files /dev/null and b/ProgrammThirdLesson/.vs/ProgrammThirdLesson/v16/.suo differ diff --git a/ProgrammThirdLesson/Hw1/App.config b/ProgrammThirdLesson/Hw1/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammThirdLesson/Hw1/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammThirdLesson/Hw1/Hw1.csproj b/ProgrammThirdLesson/Hw1/Hw1.csproj new file mode 100644 index 0000000..db17ebd --- /dev/null +++ b/ProgrammThirdLesson/Hw1/Hw1.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {E789F74E-FEAC-44ED-98D3-1B0C4D48EB1A} + Exe + Hw1 + Hw1 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ProgrammThirdLesson/Hw1/Program.cs b/ProgrammThirdLesson/Hw1/Program.cs new file mode 100644 index 0000000..ede4c66 --- /dev/null +++ b/ProgrammThirdLesson/Hw1/Program.cs @@ -0,0 +1,122 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hw1 +{ + + #region Структура для работы с комплексными числами + struct Complex + { + public double im; + public double re; + // в C# в структурах могут храниться также действия над данными + public Complex Plus(Complex x) + { + Complex y; + y.im = im + x.im; + y.re = re + x.re; + return y; + } + // Пример вычитания двух комплексных чисел + public Complex Minus(Complex x) + { + Complex y; + y.im = im - x.im; + y.re = re - x.re; + return y; + } + // Пример произведения двух комплексных чисел + public Complex Multi(Complex x) + { + Complex y; + y.im = re * x.im + im * x.re; + y.re = re * x.re - im * x.im; + return y; + } + public new string ToString => re + "+(" + im + "i)"; + } + #endregion + + + class Program + { + static void Main(string[] args) + { + #region Изменённая структура + Complex complex1; + complex1.re = 1; + complex1.im = 1; + + Complex complex2; + complex2.re = 2; + complex2.im = 2; + + Complex result = complex1.Plus(complex2); + Console.WriteLine(result.ToString); + result = complex1.Minus(complex2); + Console.WriteLine(result.ToString); + result = complex1.Multi(complex2); + Console.WriteLine(result.ToString); + #endregion + + //Комплексное число будет записываться в формате x1+ix2 + double x1 = 1; + double x2 = 1; + double y1 = 2; + double y2 = 2; + double z1; + double z2; + string oper = "не ноль"; + while (oper != "0") + { + Console.WriteLine("Введите требуемую операцию в формате '+', '-', '*', для завершения введите '0'"); + oper = Console.ReadLine(); + + switch (oper) + { + case "+": + ComplexClass.Plus(x1, x2, y1, y2, out z1, out z2); + Console.WriteLine(ComplexClass.ComplexForm(z1, z2)); + break; + case "-": + ComplexClass.Minus(x1, x2, y1, y2, out z1, out z2); + Console.WriteLine(ComplexClass.ComplexForm(z1, z2)); + break; + case "*": + ComplexClass.Multi(x1, x2, y1, y2, out z1, out z2); + Console.WriteLine(ComplexClass.ComplexForm(z1, z2)); + break; + } + } + } + + #region Класс + class ComplexClass + { + public static void Plus(double x1, double x2, double y1, double y2, out double z1, out double z2) + { + z1 = x1 + y1; + z2 = x2 + y2; + } + public static void Minus(double x1, double x2, double y1, double y2, out double z1, out double z2) + { + z1 = x1 - y1; + z2 = x2 - y2; + } + public static void Multi(double x1, double x2, double y1, double y2, out double z1, out double z2) + { + z1 = x1 * y1 - x2 * y2; + z2 = x2 * y1 + x1 * y2; + } + public static string ComplexForm(double z1, double z2) + { + return z1 + "+(" + z2 + ")i"; + } + } + #endregion + } + +} diff --git a/ProgrammThirdLesson/Hw1/Properties/AssemblyInfo.cs b/ProgrammThirdLesson/Hw1/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..e1bcc95 --- /dev/null +++ b/ProgrammThirdLesson/Hw1/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("Hw1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Hw1")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("e789f74e-feac-44ed-98d3-1b0c4d48eb1a")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgrammThirdLesson/Hw1/bin/Debug/Hw1.exe b/ProgrammThirdLesson/Hw1/bin/Debug/Hw1.exe new file mode 100644 index 0000000..5e4d0a6 Binary files /dev/null and b/ProgrammThirdLesson/Hw1/bin/Debug/Hw1.exe differ diff --git a/ProgrammThirdLesson/Hw1/bin/Debug/Hw1.exe.config b/ProgrammThirdLesson/Hw1/bin/Debug/Hw1.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammThirdLesson/Hw1/bin/Debug/Hw1.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammThirdLesson/Hw1/bin/Debug/Hw1.pdb b/ProgrammThirdLesson/Hw1/bin/Debug/Hw1.pdb new file mode 100644 index 0000000..8d402c3 Binary files /dev/null and b/ProgrammThirdLesson/Hw1/bin/Debug/Hw1.pdb differ diff --git a/ProgrammThirdLesson/Hw1/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgrammThirdLesson/Hw1/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgrammThirdLesson/Hw1/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgrammThirdLesson/Hw1/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/ProgrammThirdLesson/Hw1/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..77a9257 Binary files /dev/null and b/ProgrammThirdLesson/Hw1/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/ProgrammThirdLesson/Hw1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgrammThirdLesson/Hw1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..ce4b2a4 Binary files /dev/null and b/ProgrammThirdLesson/Hw1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgrammThirdLesson/Hw1/obj/Debug/Hw1.csproj.CoreCompileInputs.cache b/ProgrammThirdLesson/Hw1/obj/Debug/Hw1.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0c63285 --- /dev/null +++ b/ProgrammThirdLesson/Hw1/obj/Debug/Hw1.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +2f1b5aa9ca9324e732c8dc8ad98b9a6b4836d80a diff --git a/ProgrammThirdLesson/Hw1/obj/Debug/Hw1.csproj.FileListAbsolute.txt b/ProgrammThirdLesson/Hw1/obj/Debug/Hw1.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..33a6b77 --- /dev/null +++ b/ProgrammThirdLesson/Hw1/obj/Debug/Hw1.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +D:\ProgrC#\ProgrammThirdLesson\Hw1\bin\Debug\Hw1.exe.config +D:\ProgrC#\ProgrammThirdLesson\Hw1\bin\Debug\Hw1.exe +D:\ProgrC#\ProgrammThirdLesson\Hw1\bin\Debug\Hw1.pdb +D:\ProgrC#\ProgrammThirdLesson\Hw1\obj\Debug\Hw1.csprojAssemblyReference.cache +D:\ProgrC#\ProgrammThirdLesson\Hw1\obj\Debug\Hw1.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammThirdLesson\Hw1\obj\Debug\Hw1.exe +D:\ProgrC#\ProgrammThirdLesson\Hw1\obj\Debug\Hw1.pdb diff --git a/ProgrammThirdLesson/Hw1/obj/Debug/Hw1.csprojAssemblyReference.cache b/ProgrammThirdLesson/Hw1/obj/Debug/Hw1.csprojAssemblyReference.cache new file mode 100644 index 0000000..8b2ee19 Binary files /dev/null and b/ProgrammThirdLesson/Hw1/obj/Debug/Hw1.csprojAssemblyReference.cache differ diff --git a/ProgrammThirdLesson/Hw1/obj/Debug/Hw1.exe b/ProgrammThirdLesson/Hw1/obj/Debug/Hw1.exe new file mode 100644 index 0000000..5e4d0a6 Binary files /dev/null and b/ProgrammThirdLesson/Hw1/obj/Debug/Hw1.exe differ diff --git a/ProgrammThirdLesson/Hw1/obj/Debug/Hw1.pdb b/ProgrammThirdLesson/Hw1/obj/Debug/Hw1.pdb new file mode 100644 index 0000000..8d402c3 Binary files /dev/null and b/ProgrammThirdLesson/Hw1/obj/Debug/Hw1.pdb differ diff --git a/ProgrammThirdLesson/Hw2/App.config b/ProgrammThirdLesson/Hw2/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammThirdLesson/Hw2/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammThirdLesson/Hw2/Hw2.csproj b/ProgrammThirdLesson/Hw2/Hw2.csproj new file mode 100644 index 0000000..d2f3645 --- /dev/null +++ b/ProgrammThirdLesson/Hw2/Hw2.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {2435D251-0170-4044-81EB-BFEC90055DB4} + Exe + Hw2 + Hw2 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ProgrammThirdLesson/Hw2/Program.cs b/ProgrammThirdLesson/Hw2/Program.cs new file mode 100644 index 0000000..cca16f5 --- /dev/null +++ b/ProgrammThirdLesson/Hw2/Program.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hw2 +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Жирнов. С клавиатуры вводятся числа, пока не будет введён 0 (каждое число в новой строке). Требуется подсчитать сумму всех нечётных положительных чисел. Сами числа и сумму вывести на экран, используя tryParse."); + int sum = 0; + int number = 0; + Console.WriteLine("Для того, чтобы вычислить сумму всех нечётных положительных чисел задайте их. Для окончания ввода чисел введите 0"); + number = SumNaturalOddTryParse(ref sum); + Console.WriteLine("Сумма всех нечётных положительных чисел: " + sum); + Console.ReadKey(); + } + + #region Метод вычисления суммы нечётных положительных чисел + private static int SumNaturalOdd(ref int sum) + { + int number; + string s; + do + { + Console.WriteLine("Введите число: "); + s = Console.ReadLine(); + if (int.TryParse(s, out number)) + { + if ((number % 2) == 1) sum = sum + number; + } + else Console.WriteLine("Вы ввели чушь, нужно вводить целое число!"); + } + while (s != "0"); + return number; + } + #endregion + + #region Метод вычисления суммы нечётных положительных чисел + private static int SumNaturalOddTryParse(ref int sum) + { + int number; + double prov; + string s; + do + { + Console.WriteLine("Введите число: "); + prov = Convert.ToDouble(Console.ReadLine()); + prov = prov / 2; + s = Convert.ToString(prov+0.5); + if (int.TryParse(s, out number) && (number > 0)) sum = sum + number * 2-1; + else if (prov < 0) Console.WriteLine("Вы ввели отрицательное число!"); + else if (int.TryParse(Convert.ToString(prov), out number)) + Console.WriteLine("Вы ввели чётное число!"); + else Console.WriteLine("Вы ввели дробное число!"); + } + while (prov != 0); + return number; + } + #endregion + } +} + diff --git a/ProgrammThirdLesson/Hw2/Properties/AssemblyInfo.cs b/ProgrammThirdLesson/Hw2/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..9f60657 --- /dev/null +++ b/ProgrammThirdLesson/Hw2/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("Hw2")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Hw2")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("2435d251-0170-4044-81eb-bfec90055db4")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgrammThirdLesson/Hw2/bin/Debug/Hw2.exe b/ProgrammThirdLesson/Hw2/bin/Debug/Hw2.exe new file mode 100644 index 0000000..e2f5923 Binary files /dev/null and b/ProgrammThirdLesson/Hw2/bin/Debug/Hw2.exe differ diff --git a/ProgrammThirdLesson/Hw2/bin/Debug/Hw2.exe.config b/ProgrammThirdLesson/Hw2/bin/Debug/Hw2.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammThirdLesson/Hw2/bin/Debug/Hw2.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammThirdLesson/Hw2/bin/Debug/Hw2.pdb b/ProgrammThirdLesson/Hw2/bin/Debug/Hw2.pdb new file mode 100644 index 0000000..126e4c0 Binary files /dev/null and b/ProgrammThirdLesson/Hw2/bin/Debug/Hw2.pdb differ diff --git a/ProgrammThirdLesson/Hw2/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgrammThirdLesson/Hw2/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgrammThirdLesson/Hw2/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgrammThirdLesson/Hw2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgrammThirdLesson/Hw2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..8e536be Binary files /dev/null and b/ProgrammThirdLesson/Hw2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgrammThirdLesson/Hw2/obj/Debug/Hw2.csproj.CoreCompileInputs.cache b/ProgrammThirdLesson/Hw2/obj/Debug/Hw2.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0c63285 --- /dev/null +++ b/ProgrammThirdLesson/Hw2/obj/Debug/Hw2.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +2f1b5aa9ca9324e732c8dc8ad98b9a6b4836d80a diff --git a/ProgrammThirdLesson/Hw2/obj/Debug/Hw2.csproj.FileListAbsolute.txt b/ProgrammThirdLesson/Hw2/obj/Debug/Hw2.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..b9cba09 --- /dev/null +++ b/ProgrammThirdLesson/Hw2/obj/Debug/Hw2.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +D:\ProgrC#\ProgrammThirdLesson\Hw2\obj\Debug\Hw2.csprojAssemblyReference.cache +D:\ProgrC#\ProgrammThirdLesson\Hw2\obj\Debug\Hw2.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammThirdLesson\Hw2\bin\Debug\Hw2.exe.config +D:\ProgrC#\ProgrammThirdLesson\Hw2\bin\Debug\Hw2.exe +D:\ProgrC#\ProgrammThirdLesson\Hw2\bin\Debug\Hw2.pdb +D:\ProgrC#\ProgrammThirdLesson\Hw2\obj\Debug\Hw2.exe +D:\ProgrC#\ProgrammThirdLesson\Hw2\obj\Debug\Hw2.pdb diff --git a/ProgrammThirdLesson/Hw2/obj/Debug/Hw2.csprojAssemblyReference.cache b/ProgrammThirdLesson/Hw2/obj/Debug/Hw2.csprojAssemblyReference.cache new file mode 100644 index 0000000..3ae40db Binary files /dev/null and b/ProgrammThirdLesson/Hw2/obj/Debug/Hw2.csprojAssemblyReference.cache differ diff --git a/ProgrammThirdLesson/Hw2/obj/Debug/Hw2.exe b/ProgrammThirdLesson/Hw2/obj/Debug/Hw2.exe new file mode 100644 index 0000000..e2f5923 Binary files /dev/null and b/ProgrammThirdLesson/Hw2/obj/Debug/Hw2.exe differ diff --git a/ProgrammThirdLesson/Hw2/obj/Debug/Hw2.pdb b/ProgrammThirdLesson/Hw2/obj/Debug/Hw2.pdb new file mode 100644 index 0000000..126e4c0 Binary files /dev/null and b/ProgrammThirdLesson/Hw2/obj/Debug/Hw2.pdb differ diff --git a/ProgrammThirdLesson/Hw3/App.config b/ProgrammThirdLesson/Hw3/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammThirdLesson/Hw3/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammThirdLesson/Hw3/Hw3.csproj b/ProgrammThirdLesson/Hw3/Hw3.csproj new file mode 100644 index 0000000..b49c476 --- /dev/null +++ b/ProgrammThirdLesson/Hw3/Hw3.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {E4C9BC61-59DF-4B73-8C61-B1A8B35A96E6} + Exe + Hw3 + Hw3 + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ProgrammThirdLesson/Hw3/Program.cs b/ProgrammThirdLesson/Hw3/Program.cs new file mode 100644 index 0000000..ce2e420 --- /dev/null +++ b/ProgrammThirdLesson/Hw3/Program.cs @@ -0,0 +1,139 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.ExceptionServices; +using System.Text; +using System.Threading.Tasks; +/**Описать класс дробей — рациональных чисел, являющихся отношением двух целых чисел. Предусмотреть методы сложения, вычитания, умножения и деления дробей. + * Написать программу, демонстрирующую все разработанные элементы класса. +* Добавить свойства типа int для доступа к числителю и знаменателю; +* Добавить свойство типа double только на чтение, чтобы получить десятичную дробь числа; +** Добавить проверку, чтобы знаменатель не равнялся 0. Выбрасывать исключение ArgumentException("Знаменатель не может быть равен 0"); +*** Добавить упрощение дробей. +*НЕ ДОДЕЛАНО! +*/ +class Rational +{ + int num; + int denom; + public Rational() + { + num = 1; + denom = 1; + } + public Rational(int _num, int denom) + { + num = _num; + this.denom = denom; + try + { + int num = 100 / denom; + } + catch + { + Console.WriteLine($"Знаменатель не может быть равен 0"); + } + } + + public Rational Plus(Rational x2) + { + Rational x3 = new Rational(); + x3.num = num * x2.denom + x2.num * denom; + x3.denom = x2.denom * denom; + return x3; + } + public Rational Minus(Rational x2) + { + Rational x3 = new Rational(); + x3.num = num * x2.denom - x2.num * denom; + x3.denom = x2.denom * denom; + return x3; + } + public Rational Multi(Rational x2) + { + Rational x3 = new Rational(); + x3.num = num * x2.num; + x3.denom = denom * x2.denom; + return x3; + } + public Rational Split(Rational x2) + { + Rational x3 = new Rational(); + x3.num = num * x2.denom; + x3.denom = x2.num * denom; + return x3; + } + + public override string ToString() + { + return num + "/" + denom; + } + public int Num + { + get + { + return num; + } + } + public int Denom + { + get + { + return denom; + } + } + public void ToRat(out int Num, out int Denom) + { + Console.WriteLine("Введите десятичную дробь для преобразования: "); + double number = Convert.ToDouble(Console.ReadLine()); + Num = Convert.ToInt32(number * 10); + Denom = 10; + } + + public void Simple() + { + int i = num; + while ((num % i != 0) || (denom % i != 0)) + { + i--; + } + num = num / i; + denom = denom / i; + } +} +namespace Hw3 +{ + class Program + { + static void Main(string[] args) + { + + Rational rat1 = new Rational(10,15); + Rational rat2 = new Rational(1,2); + + Console.WriteLine(rat1.ToString()); + Console.WriteLine(rat2.ToString()); + Console.WriteLine("Сокращаем первую дробь:"); + rat1.Simple(); + Console.WriteLine(rat1.Num); + Console.WriteLine(rat1.Denom); + Console.WriteLine(); + Console.WriteLine(rat1.Num); + Console.WriteLine(rat1.Denom); + Console.WriteLine(rat2.Num); + Console.WriteLine(rat2.Denom); + Console.WriteLine(); + Console.WriteLine(rat1.Plus(rat2)); + Console.WriteLine(rat1.Minus(rat2)); + Console.WriteLine(rat1.Multi(rat2)); + Console.WriteLine(rat1.Split(rat2)); + Console.WriteLine(); + int Num, Denom; + rat1.ToRat(out Num,out Denom); + Console.WriteLine($"Числитель: {Num} Знаменатель: {Denom}"); + Console.WriteLine(); + Rational rat3 = new Rational(1, 0); + Console.ReadKey(); + } + } +} diff --git a/ProgrammThirdLesson/Hw3/Properties/AssemblyInfo.cs b/ProgrammThirdLesson/Hw3/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..63dff34 --- /dev/null +++ b/ProgrammThirdLesson/Hw3/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("Hw3")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Hw3")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("e4c9bc61-59df-4b73-8c61-b1a8b35a96e6")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgrammThirdLesson/Hw3/bin/Debug/Hw3.exe b/ProgrammThirdLesson/Hw3/bin/Debug/Hw3.exe new file mode 100644 index 0000000..d62c922 Binary files /dev/null and b/ProgrammThirdLesson/Hw3/bin/Debug/Hw3.exe differ diff --git a/ProgrammThirdLesson/Hw3/bin/Debug/Hw3.exe.config b/ProgrammThirdLesson/Hw3/bin/Debug/Hw3.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammThirdLesson/Hw3/bin/Debug/Hw3.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammThirdLesson/Hw3/bin/Debug/Hw3.pdb b/ProgrammThirdLesson/Hw3/bin/Debug/Hw3.pdb new file mode 100644 index 0000000..de4d94b Binary files /dev/null and b/ProgrammThirdLesson/Hw3/bin/Debug/Hw3.pdb differ diff --git a/ProgrammThirdLesson/Hw3/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgrammThirdLesson/Hw3/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgrammThirdLesson/Hw3/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgrammThirdLesson/Hw3/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgrammThirdLesson/Hw3/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..c6bb0c6 Binary files /dev/null and b/ProgrammThirdLesson/Hw3/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgrammThirdLesson/Hw3/obj/Debug/Hw3.csproj.CoreCompileInputs.cache b/ProgrammThirdLesson/Hw3/obj/Debug/Hw3.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0c63285 --- /dev/null +++ b/ProgrammThirdLesson/Hw3/obj/Debug/Hw3.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +2f1b5aa9ca9324e732c8dc8ad98b9a6b4836d80a diff --git a/ProgrammThirdLesson/Hw3/obj/Debug/Hw3.csproj.FileListAbsolute.txt b/ProgrammThirdLesson/Hw3/obj/Debug/Hw3.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..92ca227 --- /dev/null +++ b/ProgrammThirdLesson/Hw3/obj/Debug/Hw3.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +D:\ProgrC#\ProgrammThirdLesson\Hw3\bin\Debug\Hw3.exe.config +D:\ProgrC#\ProgrammThirdLesson\Hw3\bin\Debug\Hw3.exe +D:\ProgrC#\ProgrammThirdLesson\Hw3\bin\Debug\Hw3.pdb +D:\ProgrC#\ProgrammThirdLesson\Hw3\obj\Debug\Hw3.csprojAssemblyReference.cache +D:\ProgrC#\ProgrammThirdLesson\Hw3\obj\Debug\Hw3.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammThirdLesson\Hw3\obj\Debug\Hw3.exe +D:\ProgrC#\ProgrammThirdLesson\Hw3\obj\Debug\Hw3.pdb diff --git a/ProgrammThirdLesson/Hw3/obj/Debug/Hw3.csprojAssemblyReference.cache b/ProgrammThirdLesson/Hw3/obj/Debug/Hw3.csprojAssemblyReference.cache new file mode 100644 index 0000000..aeb41d6 Binary files /dev/null and b/ProgrammThirdLesson/Hw3/obj/Debug/Hw3.csprojAssemblyReference.cache differ diff --git a/ProgrammThirdLesson/Hw3/obj/Debug/Hw3.exe b/ProgrammThirdLesson/Hw3/obj/Debug/Hw3.exe new file mode 100644 index 0000000..d62c922 Binary files /dev/null and b/ProgrammThirdLesson/Hw3/obj/Debug/Hw3.exe differ diff --git a/ProgrammThirdLesson/Hw3/obj/Debug/Hw3.pdb b/ProgrammThirdLesson/Hw3/obj/Debug/Hw3.pdb new file mode 100644 index 0000000..de4d94b Binary files /dev/null and b/ProgrammThirdLesson/Hw3/obj/Debug/Hw3.pdb differ diff --git a/ProgrammThirdLesson/ProgrammThirdLesson.sln b/ProgrammThirdLesson/ProgrammThirdLesson.sln new file mode 100644 index 0000000..3531a9c --- /dev/null +++ b/ProgrammThirdLesson/ProgrammThirdLesson.sln @@ -0,0 +1,43 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30413.136 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProgrammThirdLesson", "ProgrammThirdLesson\ProgrammThirdLesson.csproj", "{92CB809B-9FBD-4ABF-9CAE-1725C51F6687}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hw1", "Hw1\Hw1.csproj", "{E789F74E-FEAC-44ED-98D3-1B0C4D48EB1A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hw2", "Hw2\Hw2.csproj", "{2435D251-0170-4044-81EB-BFEC90055DB4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hw3", "Hw3\Hw3.csproj", "{E4C9BC61-59DF-4B73-8C61-B1A8B35A96E6}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {92CB809B-9FBD-4ABF-9CAE-1725C51F6687}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {92CB809B-9FBD-4ABF-9CAE-1725C51F6687}.Debug|Any CPU.Build.0 = Debug|Any CPU + {92CB809B-9FBD-4ABF-9CAE-1725C51F6687}.Release|Any CPU.ActiveCfg = Release|Any CPU + {92CB809B-9FBD-4ABF-9CAE-1725C51F6687}.Release|Any CPU.Build.0 = Release|Any CPU + {E789F74E-FEAC-44ED-98D3-1B0C4D48EB1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E789F74E-FEAC-44ED-98D3-1B0C4D48EB1A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E789F74E-FEAC-44ED-98D3-1B0C4D48EB1A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E789F74E-FEAC-44ED-98D3-1B0C4D48EB1A}.Release|Any CPU.Build.0 = Release|Any CPU + {2435D251-0170-4044-81EB-BFEC90055DB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2435D251-0170-4044-81EB-BFEC90055DB4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2435D251-0170-4044-81EB-BFEC90055DB4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2435D251-0170-4044-81EB-BFEC90055DB4}.Release|Any CPU.Build.0 = Release|Any CPU + {E4C9BC61-59DF-4B73-8C61-B1A8B35A96E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E4C9BC61-59DF-4B73-8C61-B1A8B35A96E6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E4C9BC61-59DF-4B73-8C61-B1A8B35A96E6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E4C9BC61-59DF-4B73-8C61-B1A8B35A96E6}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {180BEF7A-AE5C-4241-BDD0-6FF98B0BE7D1} + EndGlobalSection +EndGlobal diff --git a/ProgrammThirdLesson/ProgrammThirdLesson/App.config b/ProgrammThirdLesson/ProgrammThirdLesson/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammThirdLesson/ProgrammThirdLesson/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammThirdLesson/ProgrammThirdLesson/Program.cs b/ProgrammThirdLesson/ProgrammThirdLesson/Program.cs new file mode 100644 index 0000000..715b402 --- /dev/null +++ b/ProgrammThirdLesson/ProgrammThirdLesson/Program.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProgrammThirdLesson +{ + class Program + { + static void Main(string[] args) + { + } + } +} diff --git a/ProgrammThirdLesson/ProgrammThirdLesson/ProgrammThirdLesson.csproj b/ProgrammThirdLesson/ProgrammThirdLesson/ProgrammThirdLesson.csproj new file mode 100644 index 0000000..6696270 --- /dev/null +++ b/ProgrammThirdLesson/ProgrammThirdLesson/ProgrammThirdLesson.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {92CB809B-9FBD-4ABF-9CAE-1725C51F6687} + Exe + ProgrammThirdLesson + ProgrammThirdLesson + v4.8 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ProgrammThirdLesson/ProgrammThirdLesson/Properties/AssemblyInfo.cs b/ProgrammThirdLesson/ProgrammThirdLesson/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..9b7558f --- /dev/null +++ b/ProgrammThirdLesson/ProgrammThirdLesson/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанные с этой сборкой. +[assembly: AssemblyTitle("ProgrammThirdLesson")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ProgrammThirdLesson")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// из модели COM задайте для атрибута ComVisible этого типа значение true. +[assembly: ComVisible(false)] + +// Следующий GUID представляет идентификатор typelib, если этот проект доступен из модели COM +[assembly: Guid("92cb809b-9fbd-4abf-9cae-1725c51f6687")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Номер редакции +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProgrammThirdLesson/ProgrammThirdLesson/bin/Debug/ProgrammThirdLesson.exe b/ProgrammThirdLesson/ProgrammThirdLesson/bin/Debug/ProgrammThirdLesson.exe new file mode 100644 index 0000000..da74f7b Binary files /dev/null and b/ProgrammThirdLesson/ProgrammThirdLesson/bin/Debug/ProgrammThirdLesson.exe differ diff --git a/ProgrammThirdLesson/ProgrammThirdLesson/bin/Debug/ProgrammThirdLesson.exe.config b/ProgrammThirdLesson/ProgrammThirdLesson/bin/Debug/ProgrammThirdLesson.exe.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/ProgrammThirdLesson/ProgrammThirdLesson/bin/Debug/ProgrammThirdLesson.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ProgrammThirdLesson/ProgrammThirdLesson/bin/Debug/ProgrammThirdLesson.pdb b/ProgrammThirdLesson/ProgrammThirdLesson/bin/Debug/ProgrammThirdLesson.pdb new file mode 100644 index 0000000..1a4146b Binary files /dev/null and b/ProgrammThirdLesson/ProgrammThirdLesson/bin/Debug/ProgrammThirdLesson.pdb differ diff --git a/ProgrammThirdLesson/ProgrammThirdLesson/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/ProgrammThirdLesson/ProgrammThirdLesson/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/ProgrammThirdLesson/ProgrammThirdLesson/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/ProgrammThirdLesson/ProgrammThirdLesson/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProgrammThirdLesson/ProgrammThirdLesson/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..a236ce1 Binary files /dev/null and b/ProgrammThirdLesson/ProgrammThirdLesson/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/ProgrammThirdLesson/ProgrammThirdLesson/obj/Debug/ProgrammThirdLesson.csproj.CoreCompileInputs.cache b/ProgrammThirdLesson/ProgrammThirdLesson/obj/Debug/ProgrammThirdLesson.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0c63285 --- /dev/null +++ b/ProgrammThirdLesson/ProgrammThirdLesson/obj/Debug/ProgrammThirdLesson.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +2f1b5aa9ca9324e732c8dc8ad98b9a6b4836d80a diff --git a/ProgrammThirdLesson/ProgrammThirdLesson/obj/Debug/ProgrammThirdLesson.csproj.FileListAbsolute.txt b/ProgrammThirdLesson/ProgrammThirdLesson/obj/Debug/ProgrammThirdLesson.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..c842a0f --- /dev/null +++ b/ProgrammThirdLesson/ProgrammThirdLesson/obj/Debug/ProgrammThirdLesson.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +D:\ProgrC#\ProgrammThirdLesson\ProgrammThirdLesson\bin\Debug\ProgrammThirdLesson.exe.config +D:\ProgrC#\ProgrammThirdLesson\ProgrammThirdLesson\bin\Debug\ProgrammThirdLesson.exe +D:\ProgrC#\ProgrammThirdLesson\ProgrammThirdLesson\bin\Debug\ProgrammThirdLesson.pdb +D:\ProgrC#\ProgrammThirdLesson\ProgrammThirdLesson\obj\Debug\ProgrammThirdLesson.csprojAssemblyReference.cache +D:\ProgrC#\ProgrammThirdLesson\ProgrammThirdLesson\obj\Debug\ProgrammThirdLesson.csproj.CoreCompileInputs.cache +D:\ProgrC#\ProgrammThirdLesson\ProgrammThirdLesson\obj\Debug\ProgrammThirdLesson.exe +D:\ProgrC#\ProgrammThirdLesson\ProgrammThirdLesson\obj\Debug\ProgrammThirdLesson.pdb diff --git a/ProgrammThirdLesson/ProgrammThirdLesson/obj/Debug/ProgrammThirdLesson.csprojAssemblyReference.cache b/ProgrammThirdLesson/ProgrammThirdLesson/obj/Debug/ProgrammThirdLesson.csprojAssemblyReference.cache new file mode 100644 index 0000000..cb5d7db Binary files /dev/null and b/ProgrammThirdLesson/ProgrammThirdLesson/obj/Debug/ProgrammThirdLesson.csprojAssemblyReference.cache differ diff --git a/ProgrammThirdLesson/ProgrammThirdLesson/obj/Debug/ProgrammThirdLesson.exe b/ProgrammThirdLesson/ProgrammThirdLesson/obj/Debug/ProgrammThirdLesson.exe new file mode 100644 index 0000000..da74f7b Binary files /dev/null and b/ProgrammThirdLesson/ProgrammThirdLesson/obj/Debug/ProgrammThirdLesson.exe differ diff --git a/ProgrammThirdLesson/ProgrammThirdLesson/obj/Debug/ProgrammThirdLesson.pdb b/ProgrammThirdLesson/ProgrammThirdLesson/obj/Debug/ProgrammThirdLesson.pdb new file mode 100644 index 0000000..1a4146b Binary files /dev/null and b/ProgrammThirdLesson/ProgrammThirdLesson/obj/Debug/ProgrammThirdLesson.pdb differ