1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 namespace ConsoleApp1 8 { 9 class Program 10 { 11 static void Main(string[] args) 12 { 13 int[] shu = { 1, 4, 7, 4, 2, 8, 5, 9 }; 14 15 for (int i = 0; i < shu.Length - 1; i++) 16 { 17 for (int j = 0; j < shu.Length - i- 1; j++) 18 { 19 if (shu[j + 1] > shu[j]) 20 { 21 int temp = shu[j + 1]; 22 shu[j + 1] = shu[j]; 23 shu[j] = temp; 24 } 25 } 26 } 27 for (int i = 0; i < shu.Length; i++) 28 { 29 Console.Write(shu[i] + "