Xaska Dadu

Xaska Dadu

  • NA
  • 4
  • 466

how to generate unique random number

Nov 2 2020 2:35 AM
using System; namespace G06_20201027 { class Program { static void Main() { Random r = new Random(); int[] x = new int[10]; for (int i = 0; i < x.Length; i++) { x[i] = r.Next(15); } for (int i = 0; i < x.Length; i++) { Console.WriteLine(x[i]); } Console.ReadKey(); } } }

Answers (4)