Advertisement
toko214

Untitled

Nov 1st, 2014
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. int[] arr = new int[10];
  2. Random rnd = new Random();
  3. for (int i = 0; i < arr.Length; ++i)
  4. {
  5. arr[i] = rnd.Next(10);
  6. }
  7. int[] array = new int[11];
  8. for (int j = 0; j < array.Length; ++j)
  9. {
  10. array[j] = 0;
  11. }
  12. for (int x = 0; x < 10; ++x)
  13. {
  14. if (arr[x] == x)
  15. {
  16. array[x] += 1;
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement