Advertisement
Guest User

Untitled

a guest
Jan 25th, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. {
  2. static void Main(string[] args)
  3. {
  4. int Min = 0;
  5. int Max = 0;
  6. int rozmiar = int.Parse(Console.ReadLine());
  7. int[] tablica = new int[rozmiar];
  8.  
  9. Random rand = new Random();
  10. for (int i = 0; i < tablica.Length; i++)
  11. {
  12. tablica[i] = rand.Next(0, 20);
  13. Console.WriteLine(tablica[i]);
  14. }
  15.  
  16. Console.WriteLine("MAX:" + tablica.Max());
  17. Console.WriteLine("MIN:" + tablica.Min());
  18.  
  19. Console.ReadKey();
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement