Advertisement
Djugalov

Untitled

Oct 20th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading;
  6. using System.Threading.Tasks;
  7.  
  8. namespace _01.WorkingWithSomeIntegers1stPart
  9. {
  10. class Program
  11. {
  12. //First part of the program print on the console all random generated numbers with even index
  13. static void Main(string[] args)
  14. {
  15.  
  16. for (int i = 1; i <= 100; i++)
  17. {
  18. Random rnd = new Random();
  19. int randomGeneratedNumbers = rnd.Next(0, 132);
  20. if (i % 2 == 0)
  21. {
  22. Console.WriteLine("{0} have even index {1}.", randomGeneratedNumbers, i);
  23.  
  24. }
  25. Thread.Sleep(100);
  26.  
  27. }
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement