Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- static int[] someArray = new int[] { 6777, 6666, 6653, 6666 };
- static void Sort(int[] array)
- {
- for (int i = 0; i < array.Length; i++)
- {
- if (array[i] > array[array.Length - 1])
- {
- int temp = array[i];
- array[i] = array[array.Length - 1];
- array[array.Length - 1] = temp;
- }
- }
- foreach (var item in array)
- Console.WriteLine(item);
- Console.ReadKey();
- }
- static void Main(string[] args)
- {
- Sort(someArray);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement