Advertisement
Guest User

Untitled

a guest
Dec 8th, 2012
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication35
  7. {
  8. class Program
  9. {
  10. static int n = 0;
  11. static Random rnd = new Random();
  12. static void Main(string[] args)
  13. {
  14. int [] t = new int [n];
  15. int[] a = new int[20];
  16. beker();
  17. feltolt1(t,10,99);
  18. kiir(t);
  19. Console.ReadLine();
  20. }
  21. static void beker()
  22. {
  23. n = int.Parse(Console.ReadLine());
  24. }
  25. static void feltolt1(int[] t, int a, int f)
  26. {
  27. for (int i = 0; i < t.Length; i++)
  28. {
  29. t[i] = rnd.Next(a, f);
  30. }
  31. }
  32. static void kiir(int [] t)
  33. {
  34. foreach (int q in t)
  35. {
  36. Console.WriteLine("{0}, ", q);
  37. }
  38. }
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement