Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int[] arr = new int[10];
- Random rnd = new Random();
- for (int i = 0; i < 10; ++i) arr[i] = rnd.Next(0, 10);
- Console.Write("Unsorted array: ");
- for (int i = 0; i < 10; ++i) Console.Write(arr[i].ToString() + " ");
- Console.WriteLine();
- Array.Sort(arr);
- Console.Write("Sorted array: ");
- for (int i = 0; i < 10; ++i) Console.Write(arr[i].ToString() + " ");
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement