daily pastebin goal
43%
SHARE
TWEET

Untitled

a guest Jan 21st, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public void AlegeZeceIntrebari()
  2.         {
  3.             nrIntrebari = L.Count;
  4.             a = new Intrebare[11];
  5.             Random w = new Random();
  6.             int[] t = new int[11];
  7.             int k = 0; // Cate intrebari distincte am ales
  8.             while (k < 10)
  9.             {
  10.                 int p = w.Next(nrIntrebari);
  11.                 int gasit = 0;
  12.                 for (int i = 1; i <= k; i++)
  13.                     if (t[i] == p) gasit = 1;
  14.                 if (gasit == 0) t[++k] = p;
  15.             }
  16.             for (int i = 1; i <= 10; i++)
  17.                 a[i] = L[t[i]];
  18.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top