Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int i = 0; i < array.Length; i++)
- {
- array[i] = rand.Next(0, 20);
- Console.Write(array[i] + " ");
- }
- System.Collections.ArrayList unique = new System.Collections.ArrayList();
- for (int i = 0; i < array.Length; i++)
- if (unique.IndexOf(array[i]) == -1)
- unique.Add(array[i]);
- Console.WriteLine();
- for (int i = 0; i < unique.Count; i++)
- Console.Write(unique[i] + " ");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement