diff --git a/BoubleSort/.vs/BoubleSort/v16/.suo b/BoubleSort/.vs/BoubleSort/v16/.suo new file mode 100644 index 0000000..944589c Binary files /dev/null and b/BoubleSort/.vs/BoubleSort/v16/.suo differ diff --git a/BoubleSort/.vs/BoubleSort/v16/Browse.VC.db b/BoubleSort/.vs/BoubleSort/v16/Browse.VC.db new file mode 100644 index 0000000..3585b69 Binary files /dev/null and b/BoubleSort/.vs/BoubleSort/v16/Browse.VC.db differ diff --git a/BoubleSort/.vs/BoubleSort/v16/ipch/AutoPCH/952a4c587253acd0/BOUBLESORT.ipch b/BoubleSort/.vs/BoubleSort/v16/ipch/AutoPCH/952a4c587253acd0/BOUBLESORT.ipch new file mode 100644 index 0000000..434ca73 Binary files /dev/null and b/BoubleSort/.vs/BoubleSort/v16/ipch/AutoPCH/952a4c587253acd0/BOUBLESORT.ipch differ diff --git a/BoubleSort/BoubleSort.cpp b/BoubleSort/BoubleSort.cpp new file mode 100644 index 0000000..ef75d5d --- /dev/null +++ b/BoubleSort/BoubleSort.cpp @@ -0,0 +1,49 @@ +// BoubleSort.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы. +// + +#include + +using namespace std; + +void bubleSort(int count, int *ints) { + bool flag = true; + int k; + while (flag) { + flag = false; + for (int i = 0; i < count - 1; i++) { + if (ints[i] < ints[i + 1]) { + k = ints[i]; + ints[i] = ints[i + 1]; + ints[i + 1] = k; + flag = true; + } + } + } + for (int i = 0; i < count; i++) { + cout << ints[i] << " "; + } +} + +int main() { + setlocale(LC_ALL, "ru"); + int n; + cout << "Введите кол-во символов: "; + cin >> n; + int* ints = new int[n]; + for (int i = 0; i < n; i++) { + cout << "Введите " << i << " элемент: "; + cin >> ints[i]; + } + bubleSort(n, ints); +} + +// Запуск программы: CTRL+F5 или меню "Отладка" > "Запуск без отладки" +// Отладка программы: F5 или меню "Отладка" > "Запустить отладку" + +// Советы по началу работы +// 1. В окне обозревателя решений можно добавлять файлы и управлять ими. +// 2. В окне Team Explorer можно подключиться к системе управления версиями. +// 3. В окне "Выходные данные" можно просматривать выходные данные сборки и другие сообщения. +// 4. В окне "Список ошибок" можно просматривать ошибки. +// 5. Последовательно выберите пункты меню "Проект" > "Добавить новый элемент", чтобы создать файлы кода, или "Проект" > "Добавить существующий элемент", чтобы добавить в проект существующие файлы кода. +// 6. Чтобы снова открыть этот проект позже, выберите пункты меню "Файл" > "Открыть" > "Проект" и выберите SLN-файл. diff --git a/BoubleSort/BoubleSort.sln b/BoubleSort/BoubleSort.sln new file mode 100644 index 0000000..6b832d2 --- /dev/null +++ b/BoubleSort/BoubleSort.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31205.134 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BoubleSort", "BoubleSort.vcxproj", "{925E8A92-537E-4C94-842B-23E02D4038C9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {925E8A92-537E-4C94-842B-23E02D4038C9}.Debug|x64.ActiveCfg = Debug|x64 + {925E8A92-537E-4C94-842B-23E02D4038C9}.Debug|x64.Build.0 = Debug|x64 + {925E8A92-537E-4C94-842B-23E02D4038C9}.Debug|x86.ActiveCfg = Debug|Win32 + {925E8A92-537E-4C94-842B-23E02D4038C9}.Debug|x86.Build.0 = Debug|Win32 + {925E8A92-537E-4C94-842B-23E02D4038C9}.Release|x64.ActiveCfg = Release|x64 + {925E8A92-537E-4C94-842B-23E02D4038C9}.Release|x64.Build.0 = Release|x64 + {925E8A92-537E-4C94-842B-23E02D4038C9}.Release|x86.ActiveCfg = Release|Win32 + {925E8A92-537E-4C94-842B-23E02D4038C9}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D732E894-AE82-47D5-91A2-FE5ED56BC683} + EndGlobalSection +EndGlobal diff --git a/BoubleSort/BoubleSort.vcxproj b/BoubleSort/BoubleSort.vcxproj new file mode 100644 index 0000000..7aa8302 --- /dev/null +++ b/BoubleSort/BoubleSort.vcxproj @@ -0,0 +1,147 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {925e8a92-537e-4c94-842b-23e02d4038c9} + BoubleSort + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/BoubleSort/BoubleSort.vcxproj.filters b/BoubleSort/BoubleSort.vcxproj.filters new file mode 100644 index 0000000..e41537e --- /dev/null +++ b/BoubleSort/BoubleSort.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Исходные файлы + + + \ No newline at end of file diff --git a/BoubleSort/BoubleSort.vcxproj.user b/BoubleSort/BoubleSort.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/BoubleSort/BoubleSort.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/BoubleSort/Debug/BoubleSort.exe b/BoubleSort/Debug/BoubleSort.exe new file mode 100644 index 0000000..9350b6c Binary files /dev/null and b/BoubleSort/Debug/BoubleSort.exe differ diff --git a/BoubleSort/Debug/BoubleSort.exe.recipe b/BoubleSort/Debug/BoubleSort.exe.recipe new file mode 100644 index 0000000..6a890e0 --- /dev/null +++ b/BoubleSort/Debug/BoubleSort.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\User\Desktop\03_03_2022\BoubleSort\Debug\BoubleSort.exe + + + + + + \ No newline at end of file diff --git a/BoubleSort/Debug/BoubleSort.ilk b/BoubleSort/Debug/BoubleSort.ilk new file mode 100644 index 0000000..0cc8ed0 Binary files /dev/null and b/BoubleSort/Debug/BoubleSort.ilk differ diff --git a/BoubleSort/Debug/BoubleSort.log b/BoubleSort/Debug/BoubleSort.log new file mode 100644 index 0000000..2230202 --- /dev/null +++ b/BoubleSort/Debug/BoubleSort.log @@ -0,0 +1,2 @@ + BoubleSort.cpp + BoubleSort.vcxproj -> C:\Users\User\Desktop\03_03_2022\BoubleSort\Debug\BoubleSort.exe diff --git a/BoubleSort/Debug/BoubleSort.obj b/BoubleSort/Debug/BoubleSort.obj new file mode 100644 index 0000000..e75772e Binary files /dev/null and b/BoubleSort/Debug/BoubleSort.obj differ diff --git a/BoubleSort/Debug/BoubleSort.pdb b/BoubleSort/Debug/BoubleSort.pdb new file mode 100644 index 0000000..d1cebac Binary files /dev/null and b/BoubleSort/Debug/BoubleSort.pdb differ diff --git a/BoubleSort/Debug/BoubleSort.tlog/BoubleSort.lastbuildstate b/BoubleSort/Debug/BoubleSort.tlog/BoubleSort.lastbuildstate new file mode 100644 index 0000000..5053b9d --- /dev/null +++ b/BoubleSort/Debug/BoubleSort.tlog/BoubleSort.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.28.29910:TargetPlatformVersion=10.0.19041.0: +Debug|Win32|C:\Users\User\Desktop\03_03_2022\BoubleSort\| diff --git a/BoubleSort/Debug/BoubleSort.tlog/CL.command.1.tlog b/BoubleSort/Debug/BoubleSort.tlog/CL.command.1.tlog new file mode 100644 index 0000000..6d2369e Binary files /dev/null and b/BoubleSort/Debug/BoubleSort.tlog/CL.command.1.tlog differ diff --git a/BoubleSort/Debug/BoubleSort.tlog/CL.read.1.tlog b/BoubleSort/Debug/BoubleSort.tlog/CL.read.1.tlog new file mode 100644 index 0000000..a0d120b Binary files /dev/null and b/BoubleSort/Debug/BoubleSort.tlog/CL.read.1.tlog differ diff --git a/BoubleSort/Debug/BoubleSort.tlog/CL.write.1.tlog b/BoubleSort/Debug/BoubleSort.tlog/CL.write.1.tlog new file mode 100644 index 0000000..95c4fe6 Binary files /dev/null and b/BoubleSort/Debug/BoubleSort.tlog/CL.write.1.tlog differ diff --git a/BoubleSort/Debug/BoubleSort.tlog/link.command.1.tlog b/BoubleSort/Debug/BoubleSort.tlog/link.command.1.tlog new file mode 100644 index 0000000..fe7614d Binary files /dev/null and b/BoubleSort/Debug/BoubleSort.tlog/link.command.1.tlog differ diff --git a/BoubleSort/Debug/BoubleSort.tlog/link.read.1.tlog b/BoubleSort/Debug/BoubleSort.tlog/link.read.1.tlog new file mode 100644 index 0000000..1bf1f0d Binary files /dev/null and b/BoubleSort/Debug/BoubleSort.tlog/link.read.1.tlog differ diff --git a/BoubleSort/Debug/BoubleSort.tlog/link.write.1.tlog b/BoubleSort/Debug/BoubleSort.tlog/link.write.1.tlog new file mode 100644 index 0000000..2696572 Binary files /dev/null and b/BoubleSort/Debug/BoubleSort.tlog/link.write.1.tlog differ diff --git a/BoubleSort/Debug/BoubleSort.vcxproj.FileListAbsolute.txt b/BoubleSort/Debug/BoubleSort.vcxproj.FileListAbsolute.txt new file mode 100644 index 0000000..16d9ff5 --- /dev/null +++ b/BoubleSort/Debug/BoubleSort.vcxproj.FileListAbsolute.txt @@ -0,0 +1 @@ +C:\Users\User\Desktop\03_03_2022\BoubleSort\Debug\BoubleSort.exe diff --git a/BoubleSort/Debug/vc142.idb b/BoubleSort/Debug/vc142.idb new file mode 100644 index 0000000..050ff76 Binary files /dev/null and b/BoubleSort/Debug/vc142.idb differ diff --git a/BoubleSort/Debug/vc142.pdb b/BoubleSort/Debug/vc142.pdb new file mode 100644 index 0000000..f958929 Binary files /dev/null and b/BoubleSort/Debug/vc142.pdb differ diff --git a/InsertionSort/.vs/InsertionSort/v16/.suo b/InsertionSort/.vs/InsertionSort/v16/.suo new file mode 100644 index 0000000..82b94b2 Binary files /dev/null and b/InsertionSort/.vs/InsertionSort/v16/.suo differ diff --git a/InsertionSort/.vs/InsertionSort/v16/Browse.VC.db b/InsertionSort/.vs/InsertionSort/v16/Browse.VC.db new file mode 100644 index 0000000..12a1801 Binary files /dev/null and b/InsertionSort/.vs/InsertionSort/v16/Browse.VC.db differ diff --git a/InsertionSort/.vs/InsertionSort/v16/ipch/AutoPCH/41f67ed0eb5a2354/INSERTIONSORT.ipch b/InsertionSort/.vs/InsertionSort/v16/ipch/AutoPCH/41f67ed0eb5a2354/INSERTIONSORT.ipch new file mode 100644 index 0000000..010faf1 Binary files /dev/null and b/InsertionSort/.vs/InsertionSort/v16/ipch/AutoPCH/41f67ed0eb5a2354/INSERTIONSORT.ipch differ diff --git a/InsertionSort/.vs/InsertionSort/v16/ipch/AutoPCH/5076c6d8be769d70/BOUBLESORT.ipch b/InsertionSort/.vs/InsertionSort/v16/ipch/AutoPCH/5076c6d8be769d70/BOUBLESORT.ipch new file mode 100644 index 0000000..43a0a75 Binary files /dev/null and b/InsertionSort/.vs/InsertionSort/v16/ipch/AutoPCH/5076c6d8be769d70/BOUBLESORT.ipch differ diff --git a/InsertionSort/Debug/InsertionSort.exe b/InsertionSort/Debug/InsertionSort.exe new file mode 100644 index 0000000..7d773e9 Binary files /dev/null and b/InsertionSort/Debug/InsertionSort.exe differ diff --git a/InsertionSort/Debug/InsertionSort.exe.recipe b/InsertionSort/Debug/InsertionSort.exe.recipe new file mode 100644 index 0000000..4e20cbb --- /dev/null +++ b/InsertionSort/Debug/InsertionSort.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\User\Desktop\03_03_2022\InsertionSort\Debug\InsertionSort.exe + + + + + + \ No newline at end of file diff --git a/InsertionSort/Debug/InsertionSort.ilk b/InsertionSort/Debug/InsertionSort.ilk new file mode 100644 index 0000000..b8a8ba7 Binary files /dev/null and b/InsertionSort/Debug/InsertionSort.ilk differ diff --git a/InsertionSort/Debug/InsertionSort.log b/InsertionSort/Debug/InsertionSort.log new file mode 100644 index 0000000..c2bf47a --- /dev/null +++ b/InsertionSort/Debug/InsertionSort.log @@ -0,0 +1,3 @@ + InsertionSort.cpp +C:\Users\User\Desktop\03_03_2022\InsertionSort\InsertionSort.cpp(28,1): warning C4326: возвращаемый тип "main" должен быть "int", а не "void" + InsertionSort.vcxproj -> C:\Users\User\Desktop\03_03_2022\InsertionSort\Debug\InsertionSort.exe diff --git a/InsertionSort/Debug/InsertionSort.obj b/InsertionSort/Debug/InsertionSort.obj new file mode 100644 index 0000000..36a36a2 Binary files /dev/null and b/InsertionSort/Debug/InsertionSort.obj differ diff --git a/InsertionSort/Debug/InsertionSort.pdb b/InsertionSort/Debug/InsertionSort.pdb new file mode 100644 index 0000000..a0a1dd7 Binary files /dev/null and b/InsertionSort/Debug/InsertionSort.pdb differ diff --git a/InsertionSort/Debug/InsertionSort.tlog/CL.command.1.tlog b/InsertionSort/Debug/InsertionSort.tlog/CL.command.1.tlog new file mode 100644 index 0000000..e5bc987 Binary files /dev/null and b/InsertionSort/Debug/InsertionSort.tlog/CL.command.1.tlog differ diff --git a/InsertionSort/Debug/InsertionSort.tlog/CL.read.1.tlog b/InsertionSort/Debug/InsertionSort.tlog/CL.read.1.tlog new file mode 100644 index 0000000..4500c58 Binary files /dev/null and b/InsertionSort/Debug/InsertionSort.tlog/CL.read.1.tlog differ diff --git a/InsertionSort/Debug/InsertionSort.tlog/CL.write.1.tlog b/InsertionSort/Debug/InsertionSort.tlog/CL.write.1.tlog new file mode 100644 index 0000000..3da0dd1 Binary files /dev/null and b/InsertionSort/Debug/InsertionSort.tlog/CL.write.1.tlog differ diff --git a/InsertionSort/Debug/InsertionSort.tlog/InsertionSort.lastbuildstate b/InsertionSort/Debug/InsertionSort.tlog/InsertionSort.lastbuildstate new file mode 100644 index 0000000..e348fe5 --- /dev/null +++ b/InsertionSort/Debug/InsertionSort.tlog/InsertionSort.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.28.29910:TargetPlatformVersion=10.0.19041.0: +Debug|Win32|C:\Users\User\Desktop\03_03_2022\InsertionSort\| diff --git a/InsertionSort/Debug/InsertionSort.tlog/link.command.1.tlog b/InsertionSort/Debug/InsertionSort.tlog/link.command.1.tlog new file mode 100644 index 0000000..403a442 Binary files /dev/null and b/InsertionSort/Debug/InsertionSort.tlog/link.command.1.tlog differ diff --git a/InsertionSort/Debug/InsertionSort.tlog/link.read.1.tlog b/InsertionSort/Debug/InsertionSort.tlog/link.read.1.tlog new file mode 100644 index 0000000..dcdb7a9 Binary files /dev/null and b/InsertionSort/Debug/InsertionSort.tlog/link.read.1.tlog differ diff --git a/InsertionSort/Debug/InsertionSort.tlog/link.write.1.tlog b/InsertionSort/Debug/InsertionSort.tlog/link.write.1.tlog new file mode 100644 index 0000000..05280ec Binary files /dev/null and b/InsertionSort/Debug/InsertionSort.tlog/link.write.1.tlog differ diff --git a/InsertionSort/Debug/InsertionSort.vcxproj.FileListAbsolute.txt b/InsertionSort/Debug/InsertionSort.vcxproj.FileListAbsolute.txt new file mode 100644 index 0000000..6752808 --- /dev/null +++ b/InsertionSort/Debug/InsertionSort.vcxproj.FileListAbsolute.txt @@ -0,0 +1 @@ +C:\Users\User\Desktop\03_03_2022\InsertionSort\Debug\InsertionSort.exe diff --git a/InsertionSort/Debug/vc142.idb b/InsertionSort/Debug/vc142.idb new file mode 100644 index 0000000..3a23191 Binary files /dev/null and b/InsertionSort/Debug/vc142.idb differ diff --git a/InsertionSort/Debug/vc142.pdb b/InsertionSort/Debug/vc142.pdb new file mode 100644 index 0000000..343f32a Binary files /dev/null and b/InsertionSort/Debug/vc142.pdb differ diff --git a/InsertionSort/InsertionSort.cpp b/InsertionSort/InsertionSort.cpp new file mode 100644 index 0000000..289d831 --- /dev/null +++ b/InsertionSort/InsertionSort.cpp @@ -0,0 +1,50 @@ +// InsertionSort.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы. +// + +#include + +using namespace std; + +void insertionSort(int count, int* ints) { + int key = 0, temp = 0; + for (int i = 0; i < count - 1; i++) { + key = i + 1; + temp = ints[key]; + for (int j = i + 1; j > 0; j--) { + if (temp > ints[j - 1]) { + ints[j] = ints[j - 1]; + key = j - 1; + } + } + ints[key] = temp; + } + for (int i = 0; i < count; i++) { + cout << ints[i] << " "; + } +} + + +void main() +{ + setlocale(LC_ALL, "Rus"); + int n; + cout << "Введите кол-во символов: "; + cin >> n; + int* ints = new int[n]; + for (int i = 0; i < n; i++) { + cout << i + 1 << " элемент > "; + cin >> ints[i]; + } + insertionSort(n, ints); +} + +// Запуск программы: CTRL+F5 или меню "Отладка" > "Запуск без отладки" +// Отладка программы: F5 или меню "Отладка" > "Запустить отладку" + +// Советы по началу работы +// 1. В окне обозревателя решений можно добавлять файлы и управлять ими. +// 2. В окне Team Explorer можно подключиться к системе управления версиями. +// 3. В окне "Выходные данные" можно просматривать выходные данные сборки и другие сообщения. +// 4. В окне "Список ошибок" можно просматривать ошибки. +// 5. Последовательно выберите пункты меню "Проект" > "Добавить новый элемент", чтобы создать файлы кода, или "Проект" > "Добавить существующий элемент", чтобы добавить в проект существующие файлы кода. +// 6. Чтобы снова открыть этот проект позже, выберите пункты меню "Файл" > "Открыть" > "Проект" и выберите SLN-файл. diff --git a/InsertionSort/InsertionSort.sln b/InsertionSort/InsertionSort.sln new file mode 100644 index 0000000..26fe719 --- /dev/null +++ b/InsertionSort/InsertionSort.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31205.134 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InsertionSort", "InsertionSort.vcxproj", "{7823A704-037B-4A04-826E-B117E1816CCB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7823A704-037B-4A04-826E-B117E1816CCB}.Debug|x64.ActiveCfg = Debug|x64 + {7823A704-037B-4A04-826E-B117E1816CCB}.Debug|x64.Build.0 = Debug|x64 + {7823A704-037B-4A04-826E-B117E1816CCB}.Debug|x86.ActiveCfg = Debug|Win32 + {7823A704-037B-4A04-826E-B117E1816CCB}.Debug|x86.Build.0 = Debug|Win32 + {7823A704-037B-4A04-826E-B117E1816CCB}.Release|x64.ActiveCfg = Release|x64 + {7823A704-037B-4A04-826E-B117E1816CCB}.Release|x64.Build.0 = Release|x64 + {7823A704-037B-4A04-826E-B117E1816CCB}.Release|x86.ActiveCfg = Release|Win32 + {7823A704-037B-4A04-826E-B117E1816CCB}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {9583E4C8-52E2-426F-838D-7C4FD857C42E} + EndGlobalSection +EndGlobal diff --git a/InsertionSort/InsertionSort.vcxproj b/InsertionSort/InsertionSort.vcxproj new file mode 100644 index 0000000..a2690ab --- /dev/null +++ b/InsertionSort/InsertionSort.vcxproj @@ -0,0 +1,147 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {7823a704-037b-4a04-826e-b117e1816ccb} + InsertionSort + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/InsertionSort/InsertionSort.vcxproj.filters b/InsertionSort/InsertionSort.vcxproj.filters new file mode 100644 index 0000000..cdc539e --- /dev/null +++ b/InsertionSort/InsertionSort.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Исходные файлы + + + \ No newline at end of file diff --git a/InsertionSort/InsertionSort.vcxproj.user b/InsertionSort/InsertionSort.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/InsertionSort/InsertionSort.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/SelectionSort/.vs/SelectionSort/v16/.suo b/SelectionSort/.vs/SelectionSort/v16/.suo new file mode 100644 index 0000000..0121c55 Binary files /dev/null and b/SelectionSort/.vs/SelectionSort/v16/.suo differ diff --git a/SelectionSort/.vs/SelectionSort/v16/Browse.VC.db b/SelectionSort/.vs/SelectionSort/v16/Browse.VC.db new file mode 100644 index 0000000..02d5ddd Binary files /dev/null and b/SelectionSort/.vs/SelectionSort/v16/Browse.VC.db differ diff --git a/SelectionSort/.vs/SelectionSort/v16/ipch/AutoPCH/446e92a32a66ccfd/BOUBLESORT.ipch b/SelectionSort/.vs/SelectionSort/v16/ipch/AutoPCH/446e92a32a66ccfd/BOUBLESORT.ipch new file mode 100644 index 0000000..f8468f3 Binary files /dev/null and b/SelectionSort/.vs/SelectionSort/v16/ipch/AutoPCH/446e92a32a66ccfd/BOUBLESORT.ipch differ diff --git a/SelectionSort/.vs/SelectionSort/v16/ipch/AutoPCH/5efc271cf2affb44/SELECTIONSORT.ipch b/SelectionSort/.vs/SelectionSort/v16/ipch/AutoPCH/5efc271cf2affb44/SELECTIONSORT.ipch new file mode 100644 index 0000000..f217afa Binary files /dev/null and b/SelectionSort/.vs/SelectionSort/v16/ipch/AutoPCH/5efc271cf2affb44/SELECTIONSORT.ipch differ diff --git a/SelectionSort/.vs/SelectionSort/v16/ipch/AutoPCH/a736901e6268da66/SELECTIONSORT.ipch b/SelectionSort/.vs/SelectionSort/v16/ipch/AutoPCH/a736901e6268da66/SELECTIONSORT.ipch new file mode 100644 index 0000000..c0a3d00 Binary files /dev/null and b/SelectionSort/.vs/SelectionSort/v16/ipch/AutoPCH/a736901e6268da66/SELECTIONSORT.ipch differ diff --git a/SelectionSort/Debug/SelectionSort.exe b/SelectionSort/Debug/SelectionSort.exe new file mode 100644 index 0000000..8bd1e5b Binary files /dev/null and b/SelectionSort/Debug/SelectionSort.exe differ diff --git a/SelectionSort/Debug/SelectionSort.exe.recipe b/SelectionSort/Debug/SelectionSort.exe.recipe new file mode 100644 index 0000000..1d7ca56 --- /dev/null +++ b/SelectionSort/Debug/SelectionSort.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\User\Desktop\03_03_2022\SelectionSort\Debug\SelectionSort.exe + + + + + + \ No newline at end of file diff --git a/SelectionSort/Debug/SelectionSort.ilk b/SelectionSort/Debug/SelectionSort.ilk new file mode 100644 index 0000000..0b38710 Binary files /dev/null and b/SelectionSort/Debug/SelectionSort.ilk differ diff --git a/SelectionSort/Debug/SelectionSort.log b/SelectionSort/Debug/SelectionSort.log new file mode 100644 index 0000000..0aed5d4 --- /dev/null +++ b/SelectionSort/Debug/SelectionSort.log @@ -0,0 +1,2 @@ + SelectionSort.cpp + SelectionSort.vcxproj -> C:\Users\User\Desktop\03_03_2022\SelectionSort\Debug\SelectionSort.exe diff --git a/SelectionSort/Debug/SelectionSort.obj b/SelectionSort/Debug/SelectionSort.obj new file mode 100644 index 0000000..f6d39fc Binary files /dev/null and b/SelectionSort/Debug/SelectionSort.obj differ diff --git a/SelectionSort/Debug/SelectionSort.pdb b/SelectionSort/Debug/SelectionSort.pdb new file mode 100644 index 0000000..efb80b5 Binary files /dev/null and b/SelectionSort/Debug/SelectionSort.pdb differ diff --git a/SelectionSort/Debug/SelectionSort.tlog/CL.command.1.tlog b/SelectionSort/Debug/SelectionSort.tlog/CL.command.1.tlog new file mode 100644 index 0000000..33ae287 Binary files /dev/null and b/SelectionSort/Debug/SelectionSort.tlog/CL.command.1.tlog differ diff --git a/SelectionSort/Debug/SelectionSort.tlog/CL.read.1.tlog b/SelectionSort/Debug/SelectionSort.tlog/CL.read.1.tlog new file mode 100644 index 0000000..141a662 Binary files /dev/null and b/SelectionSort/Debug/SelectionSort.tlog/CL.read.1.tlog differ diff --git a/SelectionSort/Debug/SelectionSort.tlog/CL.write.1.tlog b/SelectionSort/Debug/SelectionSort.tlog/CL.write.1.tlog new file mode 100644 index 0000000..c33fcdb Binary files /dev/null and b/SelectionSort/Debug/SelectionSort.tlog/CL.write.1.tlog differ diff --git a/SelectionSort/Debug/SelectionSort.tlog/SelectionSort.lastbuildstate b/SelectionSort/Debug/SelectionSort.tlog/SelectionSort.lastbuildstate new file mode 100644 index 0000000..302c741 --- /dev/null +++ b/SelectionSort/Debug/SelectionSort.tlog/SelectionSort.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.28.29910:TargetPlatformVersion=10.0.19041.0: +Debug|Win32|C:\Users\User\Desktop\03_03_2022\SelectionSort\| diff --git a/SelectionSort/Debug/SelectionSort.tlog/link.command.1.tlog b/SelectionSort/Debug/SelectionSort.tlog/link.command.1.tlog new file mode 100644 index 0000000..0849f5f Binary files /dev/null and b/SelectionSort/Debug/SelectionSort.tlog/link.command.1.tlog differ diff --git a/SelectionSort/Debug/SelectionSort.tlog/link.read.1.tlog b/SelectionSort/Debug/SelectionSort.tlog/link.read.1.tlog new file mode 100644 index 0000000..6efae97 Binary files /dev/null and b/SelectionSort/Debug/SelectionSort.tlog/link.read.1.tlog differ diff --git a/SelectionSort/Debug/SelectionSort.tlog/link.write.1.tlog b/SelectionSort/Debug/SelectionSort.tlog/link.write.1.tlog new file mode 100644 index 0000000..80deb1c Binary files /dev/null and b/SelectionSort/Debug/SelectionSort.tlog/link.write.1.tlog differ diff --git a/SelectionSort/Debug/SelectionSort.vcxproj.FileListAbsolute.txt b/SelectionSort/Debug/SelectionSort.vcxproj.FileListAbsolute.txt new file mode 100644 index 0000000..abd0409 --- /dev/null +++ b/SelectionSort/Debug/SelectionSort.vcxproj.FileListAbsolute.txt @@ -0,0 +1 @@ +C:\Users\User\Desktop\03_03_2022\SelectionSort\Debug\SelectionSort.exe diff --git a/SelectionSort/Debug/vc142.idb b/SelectionSort/Debug/vc142.idb new file mode 100644 index 0000000..7f4be25 Binary files /dev/null and b/SelectionSort/Debug/vc142.idb differ diff --git a/SelectionSort/Debug/vc142.pdb b/SelectionSort/Debug/vc142.pdb new file mode 100644 index 0000000..7d32a26 Binary files /dev/null and b/SelectionSort/Debug/vc142.pdb differ diff --git a/SelectionSort/SelectionSort.cpp b/SelectionSort/SelectionSort.cpp new file mode 100644 index 0000000..f4db2b1 --- /dev/null +++ b/SelectionSort/SelectionSort.cpp @@ -0,0 +1,46 @@ +// SelectionSort.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы. +// + +#include + +using namespace std; + +void selectionSort(int count, int* ints) { + int k; + for (int i = 0; i < count - 1; i++) { + for (int i = 0; i + 1 < count; i++) { + if (ints[i] < ints[i + 1]) { + k = ints[i]; + ints[i] = ints[i + 1]; + ints[i + 1] = k; + } + } + } + for (int i = 0; i < count; i++) { + cout << ints[i] << " "; + } +} + +int main() { + setlocale(LC_ALL, "ru"); + int n; + cout << "Введите кол-во символов: "; + cin >> n; + int* ints = new int[n]; + for (int i = 0; i < n; i++) { + cout << "Введите " << i << " элемент: "; + cin >> ints[i]; + } + selectionSort(n, ints); +} + +// Запуск программы: CTRL+F5 или меню "Отладка" > "Запуск без отладки" +// Отладка программы: F5 или меню "Отладка" > "Запустить отладку" + +// Советы по началу работы +// 1. В окне обозревателя решений можно добавлять файлы и управлять ими. +// 2. В окне Team Explorer можно подключиться к системе управления версиями. +// 3. В окне "Выходные данные" можно просматривать выходные данные сборки и другие сообщения. +// 4. В окне "Список ошибок" можно просматривать ошибки. +// 5. Последовательно выберите пункты меню "Проект" > "Добавить новый элемент", чтобы создать файлы кода, или "Проект" > "Добавить существующий элемент", чтобы добавить в проект существующие файлы кода. +// 6. Чтобы снова открыть этот проект позже, выберите пункты меню "Файл" > "Открыть" > "Проект" и выберите SLN-файл. diff --git a/SelectionSort/SelectionSort.sln b/SelectionSort/SelectionSort.sln new file mode 100644 index 0000000..e501cd9 --- /dev/null +++ b/SelectionSort/SelectionSort.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31205.134 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SelectionSort", "SelectionSort.vcxproj", "{7D6125AE-9B2E-472C-B5D3-743C6BADC15D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7D6125AE-9B2E-472C-B5D3-743C6BADC15D}.Debug|x64.ActiveCfg = Debug|x64 + {7D6125AE-9B2E-472C-B5D3-743C6BADC15D}.Debug|x64.Build.0 = Debug|x64 + {7D6125AE-9B2E-472C-B5D3-743C6BADC15D}.Debug|x86.ActiveCfg = Debug|Win32 + {7D6125AE-9B2E-472C-B5D3-743C6BADC15D}.Debug|x86.Build.0 = Debug|Win32 + {7D6125AE-9B2E-472C-B5D3-743C6BADC15D}.Release|x64.ActiveCfg = Release|x64 + {7D6125AE-9B2E-472C-B5D3-743C6BADC15D}.Release|x64.Build.0 = Release|x64 + {7D6125AE-9B2E-472C-B5D3-743C6BADC15D}.Release|x86.ActiveCfg = Release|Win32 + {7D6125AE-9B2E-472C-B5D3-743C6BADC15D}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {2B716918-2ADD-4C1D-82BF-6F012A734671} + EndGlobalSection +EndGlobal diff --git a/SelectionSort/SelectionSort.vcxproj b/SelectionSort/SelectionSort.vcxproj new file mode 100644 index 0000000..f338b22 --- /dev/null +++ b/SelectionSort/SelectionSort.vcxproj @@ -0,0 +1,147 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {7d6125ae-9b2e-472c-b5d3-743c6badc15d} + SelectionSort + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/SelectionSort/SelectionSort.vcxproj.filters b/SelectionSort/SelectionSort.vcxproj.filters new file mode 100644 index 0000000..da64db2 --- /dev/null +++ b/SelectionSort/SelectionSort.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Исходные файлы + + + \ No newline at end of file diff --git a/SelectionSort/SelectionSort.vcxproj.user b/SelectionSort/SelectionSort.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/SelectionSort/SelectionSort.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ShellSort/.vs/ShellSort/v16/.suo b/ShellSort/.vs/ShellSort/v16/.suo new file mode 100644 index 0000000..c82da0a Binary files /dev/null and b/ShellSort/.vs/ShellSort/v16/.suo differ diff --git a/ShellSort/.vs/ShellSort/v16/Browse.VC.db b/ShellSort/.vs/ShellSort/v16/Browse.VC.db new file mode 100644 index 0000000..f81248c Binary files /dev/null and b/ShellSort/.vs/ShellSort/v16/Browse.VC.db differ diff --git a/ShellSort/.vs/ShellSort/v16/ipch/AutoPCH/66039bb86959198e/SHELLSORT.ipch b/ShellSort/.vs/ShellSort/v16/ipch/AutoPCH/66039bb86959198e/SHELLSORT.ipch new file mode 100644 index 0000000..aa97ceb Binary files /dev/null and b/ShellSort/.vs/ShellSort/v16/ipch/AutoPCH/66039bb86959198e/SHELLSORT.ipch differ diff --git a/ShellSort/.vs/ShellSort/v16/ipch/AutoPCH/937fe2cca862a292/SHELLSORT.ipch b/ShellSort/.vs/ShellSort/v16/ipch/AutoPCH/937fe2cca862a292/SHELLSORT.ipch new file mode 100644 index 0000000..328f570 Binary files /dev/null and b/ShellSort/.vs/ShellSort/v16/ipch/AutoPCH/937fe2cca862a292/SHELLSORT.ipch differ diff --git a/ShellSort/Debug/ShellSort.exe b/ShellSort/Debug/ShellSort.exe new file mode 100644 index 0000000..5f10cb9 Binary files /dev/null and b/ShellSort/Debug/ShellSort.exe differ diff --git a/ShellSort/Debug/ShellSort.exe.recipe b/ShellSort/Debug/ShellSort.exe.recipe new file mode 100644 index 0000000..a9c5cfb --- /dev/null +++ b/ShellSort/Debug/ShellSort.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\User\Desktop\03_03_2022\Study\ShellSort\Debug\ShellSort.exe + + + + + + \ No newline at end of file diff --git a/ShellSort/Debug/ShellSort.ilk b/ShellSort/Debug/ShellSort.ilk new file mode 100644 index 0000000..053dcfd Binary files /dev/null and b/ShellSort/Debug/ShellSort.ilk differ diff --git a/ShellSort/Debug/ShellSort.log b/ShellSort/Debug/ShellSort.log new file mode 100644 index 0000000..d185cdb --- /dev/null +++ b/ShellSort/Debug/ShellSort.log @@ -0,0 +1,2 @@ + ShellSort.cpp + ShellSort.vcxproj -> C:\Users\User\Desktop\03_03_2022\Study\ShellSort\Debug\ShellSort.exe diff --git a/ShellSort/Debug/ShellSort.obj b/ShellSort/Debug/ShellSort.obj new file mode 100644 index 0000000..6b7745d Binary files /dev/null and b/ShellSort/Debug/ShellSort.obj differ diff --git a/ShellSort/Debug/ShellSort.pdb b/ShellSort/Debug/ShellSort.pdb new file mode 100644 index 0000000..e207da4 Binary files /dev/null and b/ShellSort/Debug/ShellSort.pdb differ diff --git a/ShellSort/Debug/ShellSort.tlog/CL.command.1.tlog b/ShellSort/Debug/ShellSort.tlog/CL.command.1.tlog new file mode 100644 index 0000000..064b7b6 Binary files /dev/null and b/ShellSort/Debug/ShellSort.tlog/CL.command.1.tlog differ diff --git a/ShellSort/Debug/ShellSort.tlog/CL.read.1.tlog b/ShellSort/Debug/ShellSort.tlog/CL.read.1.tlog new file mode 100644 index 0000000..776351e Binary files /dev/null and b/ShellSort/Debug/ShellSort.tlog/CL.read.1.tlog differ diff --git a/ShellSort/Debug/ShellSort.tlog/CL.write.1.tlog b/ShellSort/Debug/ShellSort.tlog/CL.write.1.tlog new file mode 100644 index 0000000..b296f72 Binary files /dev/null and b/ShellSort/Debug/ShellSort.tlog/CL.write.1.tlog differ diff --git a/ShellSort/Debug/ShellSort.tlog/ShellSort.lastbuildstate b/ShellSort/Debug/ShellSort.tlog/ShellSort.lastbuildstate new file mode 100644 index 0000000..5e3a40a --- /dev/null +++ b/ShellSort/Debug/ShellSort.tlog/ShellSort.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.28.29910:TargetPlatformVersion=10.0.19041.0: +Debug|Win32|C:\Users\User\Desktop\03_03_2022\Study\ShellSort\| diff --git a/ShellSort/Debug/ShellSort.tlog/link.command.1.tlog b/ShellSort/Debug/ShellSort.tlog/link.command.1.tlog new file mode 100644 index 0000000..b083718 Binary files /dev/null and b/ShellSort/Debug/ShellSort.tlog/link.command.1.tlog differ diff --git a/ShellSort/Debug/ShellSort.tlog/link.read.1.tlog b/ShellSort/Debug/ShellSort.tlog/link.read.1.tlog new file mode 100644 index 0000000..5ed0277 Binary files /dev/null and b/ShellSort/Debug/ShellSort.tlog/link.read.1.tlog differ diff --git a/ShellSort/Debug/ShellSort.tlog/link.write.1.tlog b/ShellSort/Debug/ShellSort.tlog/link.write.1.tlog new file mode 100644 index 0000000..cc424a7 Binary files /dev/null and b/ShellSort/Debug/ShellSort.tlog/link.write.1.tlog differ diff --git a/ShellSort/Debug/ShellSort.vcxproj.FileListAbsolute.txt b/ShellSort/Debug/ShellSort.vcxproj.FileListAbsolute.txt new file mode 100644 index 0000000..fccace3 --- /dev/null +++ b/ShellSort/Debug/ShellSort.vcxproj.FileListAbsolute.txt @@ -0,0 +1 @@ +C:\Users\User\Desktop\03_03_2022\Study\ShellSort\Debug\ShellSort.exe diff --git a/ShellSort/Debug/vc142.idb b/ShellSort/Debug/vc142.idb new file mode 100644 index 0000000..80ec839 Binary files /dev/null and b/ShellSort/Debug/vc142.idb differ diff --git a/ShellSort/Debug/vc142.pdb b/ShellSort/Debug/vc142.pdb new file mode 100644 index 0000000..bf844ec Binary files /dev/null and b/ShellSort/Debug/vc142.pdb differ diff --git a/ShellSort/ShellSort.cpp b/ShellSort/ShellSort.cpp new file mode 100644 index 0000000..afb8ba5 --- /dev/null +++ b/ShellSort/ShellSort.cpp @@ -0,0 +1,48 @@ +// ShellSort.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы. +// + +#include + +using namespace std; + +void shellSort(int count, int* ints) { + int inc = count / 2; + while (inc) { + for (int i = inc; i < count; i++) { + int temp = ints[i]; + while (i >= inc && ints[i - inc] > temp) { + ints[i] = ints[i - inc]; + i -= inc; + } + ints[i] = temp; + } + inc /= 2; + } + for (int i = 0; i < count; i++) { + cout << ints[i] << " "; + } +} + +int main() { + setlocale(LC_ALL, "ru"); + int n; + cout << "Введите кол-во символов: "; + cin >> n; + int* ints = new int[n]; + for (int i = 0; i < n; i++) { + cout << "Введите " << i << " элемент: "; + cin >> ints[i]; + } + shellSort(n, ints); +} + +// Запуск программы: CTRL+F5 или меню "Отладка" > "Запуск без отладки" +// Отладка программы: F5 или меню "Отладка" > "Запустить отладку" + +// Советы по началу работы +// 1. В окне обозревателя решений можно добавлять файлы и управлять ими. +// 2. В окне Team Explorer можно подключиться к системе управления версиями. +// 3. В окне "Выходные данные" можно просматривать выходные данные сборки и другие сообщения. +// 4. В окне "Список ошибок" можно просматривать ошибки. +// 5. Последовательно выберите пункты меню "Проект" > "Добавить новый элемент", чтобы создать файлы кода, или "Проект" > "Добавить существующий элемент", чтобы добавить в проект существующие файлы кода. +// 6. Чтобы снова открыть этот проект позже, выберите пункты меню "Файл" > "Открыть" > "Проект" и выберите SLN-файл. diff --git a/ShellSort/ShellSort.sln b/ShellSort/ShellSort.sln new file mode 100644 index 0000000..18fcc3d --- /dev/null +++ b/ShellSort/ShellSort.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31205.134 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ShellSort", "ShellSort.vcxproj", "{A55B3E57-1E15-4C4C-9BF9-4EA4AF67BED1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A55B3E57-1E15-4C4C-9BF9-4EA4AF67BED1}.Debug|x64.ActiveCfg = Debug|x64 + {A55B3E57-1E15-4C4C-9BF9-4EA4AF67BED1}.Debug|x64.Build.0 = Debug|x64 + {A55B3E57-1E15-4C4C-9BF9-4EA4AF67BED1}.Debug|x86.ActiveCfg = Debug|Win32 + {A55B3E57-1E15-4C4C-9BF9-4EA4AF67BED1}.Debug|x86.Build.0 = Debug|Win32 + {A55B3E57-1E15-4C4C-9BF9-4EA4AF67BED1}.Release|x64.ActiveCfg = Release|x64 + {A55B3E57-1E15-4C4C-9BF9-4EA4AF67BED1}.Release|x64.Build.0 = Release|x64 + {A55B3E57-1E15-4C4C-9BF9-4EA4AF67BED1}.Release|x86.ActiveCfg = Release|Win32 + {A55B3E57-1E15-4C4C-9BF9-4EA4AF67BED1}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {2A373E8D-6236-468C-AFA3-F327AF7934CF} + EndGlobalSection +EndGlobal diff --git a/ShellSort/ShellSort.vcxproj b/ShellSort/ShellSort.vcxproj new file mode 100644 index 0000000..2b56418 --- /dev/null +++ b/ShellSort/ShellSort.vcxproj @@ -0,0 +1,147 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {a55b3e57-1e15-4c4c-9bf9-4ea4af67bed1} + ShellSort + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/ShellSort/ShellSort.vcxproj.filters b/ShellSort/ShellSort.vcxproj.filters new file mode 100644 index 0000000..9149e2b --- /dev/null +++ b/ShellSort/ShellSort.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Исходные файлы + + + \ No newline at end of file diff --git a/ShellSort/ShellSort.vcxproj.user b/ShellSort/ShellSort.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/ShellSort/ShellSort.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file