Удалены более ненужные файлы
This commit is contained in:
		
							parent
							
								
									0fc0fdb125
								
							
						
					
					
						commit
						20c29a2a12
					
				
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 506 KiB | 
| @ -8,10 +8,4 @@ | ||||
|     <UseWindowsForms>True</UseWindowsForms> | ||||
|   </PropertyGroup> | ||||
| 
 | ||||
|   <ItemGroup> | ||||
|     <None Update="GUI\background.jpg"> | ||||
|       <CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||||
|     </None> | ||||
|   </ItemGroup> | ||||
| 
 | ||||
| </Project> | ||||
|  | ||||
| @ -1,71 +0,0 @@ | ||||
| using laba3.Core; | ||||
| using System; | ||||
| using System.Collections.Generic; | ||||
| using System.Diagnostics; | ||||
| using System.Drawing; | ||||
| using System.Linq; | ||||
| using System.Text; | ||||
| using System.Threading.Tasks; | ||||
| using static System.Runtime.InteropServices.JavaScript.JSType; | ||||
| 
 | ||||
| namespace laba3.Subprograms | ||||
| { | ||||
|     /// <summary> | ||||
|     /// Compare computing time of 2 sorting methods; | ||||
|     /// Gnome sort and Shell sort; | ||||
|     /// </summary> | ||||
|     internal class ArraySortDemo | ||||
|     { | ||||
|         private long time1; | ||||
|         private long time2; | ||||
| 
 | ||||
|         /// <summary> | ||||
|         /// Get values from keyboard, init arrays, start computing, print time; | ||||
|         /// Console will be clean!; | ||||
|         /// </summary> | ||||
|         public void Run() | ||||
|         { | ||||
|             Utils.Arrays array1; | ||||
|             Utils.Arrays array2; | ||||
|             int size; | ||||
|             size = ReadArrayLen(); | ||||
|             array1 = new Utils.Arrays(size, 100); | ||||
|             array2 = new Utils.Arrays(array1); | ||||
| 
 | ||||
|             Console.WriteLine("Для Массива 1 будет использована \"гномья сортировка\""); | ||||
|             Console.WriteLine("Для Массива 2 будет использована \"сортировка шелла\""); | ||||
| 
 | ||||
|             if (size <= 10) | ||||
|                 array1.print("с начальными значениями"); | ||||
|             else | ||||
|                 Console.WriteLine("Массивы не могут быть выведены на экран так как их размер больше 10"); | ||||
|             Console.WriteLine("Сортируем..."); | ||||
| 
 | ||||
|             time1 = array1.gnomeSort(); | ||||
|             time2 = array2.shellSort(); | ||||
| 
 | ||||
|             Console.WriteLine("Готово!"); | ||||
|             if (size <= 10) | ||||
|             { | ||||
|                 array1.print("после гномьей сортировки"); | ||||
|                 array2.print("после сортировки шелла  "); | ||||
|             } | ||||
| 
 | ||||
|             Console.WriteLine($"Для сортировки 1 потребовалось {time1}мс"); | ||||
|             Console.WriteLine($"Для сортировки 2 потребовалось {time2}мс"); | ||||
|         } | ||||
| 
 | ||||
|         private int ReadArrayLen() | ||||
|         { | ||||
|             int size; | ||||
|             do | ||||
|             { | ||||
|                 size = Utils.ReadInt("Размер массива для сортировки"); | ||||
|                 Console.Clear(); | ||||
|                 if (size < 1) | ||||
|                     Console.WriteLine("Размер не может быть меньше 1!"); | ||||
|             } while (size < 1); | ||||
|             return size; | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user