Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.80 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication2
  8. {
  9. class Sort
  10. {
  11. static void Sort1()
  12. {
  13.  
  14. }
  15. static void Sort2()
  16. {
  17.  
  18. }
  19. static void Sort3()
  20. {
  21.  
  22. }
  23. static void SortPlus()
  24. {
  25.  
  26. }
  27. }
  28. class Program
  29. {
  30. int[] Array(out string text, uint check)
  31. {
  32. uint param1 = 0;
  33. uint param2 = 100;
  34. text = "Введите длинну массива(>=0)";
  35. AllNumbers(text, out check, param1, param2);
  36. int[] Array = new int[check];
  37. Random rnd = new Random();
  38. for (int i = 0; i < check; i++)
  39. Array[i] = rnd.Next(-99 , 99);
  40. Console.WriteLine("Массив создан");
  41. return Array;
  42. }//Создание массива случайным способом
  43. static uint AllNumbers(string text,out uint check,uint param1, uint param2)
  44. {
  45. bool ok;
  46. Console.WriteLine(text);
  47. do
  48. {
  49. ok = uint.TryParse(Console.ReadLine(), out check);
  50. if (ok == false || check <= param1 || check >= param2)
  51. {
  52. Console.WriteLine("Ошибка");
  53. }
  54. }
  55. while (!ok);
  56. return check;
  57. }//Ввод числа
  58. static uint Menu(out uint MainMenu)
  59. {
  60. uint check;
  61. string text;
  62. uint param1 = 1;
  63. uint param2 = 5;
  64. text = "Выберете пункт меню \n1)Cортировка вставками \n2)Сортировка выбором \n3)Быстрая сортировка(Рекурсивный метод) \n4)Сортировка ... \n5)Выход";
  65. AllNumbers(text, out check, param1, param2);
  66. MainMenu = check;
  67. return MainMenu;
  68. } //Функция главного меню
  69. void ArrPrint
  70.  
  71. static void Main(string[] args)
  72. {
  73. uint MainMenu = 0;
  74. do
  75. {
  76. Menu(out MainMenu);
  77. switch (MainMenu)
  78. {
  79. case 1:
  80.  
  81. break;
  82. case 2:
  83. break;
  84. case 3:
  85. break;
  86. case 4:
  87. break;
  88. case 5:
  89. break;
  90. default:
  91. break;
  92.  
  93. }
  94. }
  95. while (MainMenu != 5);
  96.  
  97. }
  98. }
  99. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement