fork(1) download
  1. using System;
  2. using System.Linq;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. int[] x = new int[10];
  9. Random r = new Random();
  10.  
  11. while (x.Any(item => item == 1) == false)
  12. {
  13. for (int i = 0; i < x.Length; i++)
  14. {
  15. x[i] = r.Next(0, 2);
  16. }
  17. }
  18.  
  19. for (int i = 0; i < x.Length; i++)
  20. {
  21. Console.WriteLine(x[i]);
  22. }
  23. }
  24. }
Success #stdin #stdout 0.03s 33912KB
stdin
Standard input is empty
stdout
1
0
1
1
1
0
1
1
0
1